Camera API's stopped working  
Author Message
_Stoic





PostPosted: .NET Compact Framework, Camera API's stopped working Top

My camera capture method below, no longer seems to works on my i-mate SP5 (HTC Tornado)..

The code worked and ran perfectly for the last few months, on both NETCF2..0 and the Beta of NetCF2.0 Service pack 1, but since I upgraded my device today to the new release candidate (non Beta), it no longer works and throws an InvalidOperation Exception on CameraCaptureDialog.ShowDialog(); method.

The .Net themselves seem to work alright, except the camera functionality no longer works

/**********************************************************************
* METHOD: startCamera
**********************************************************************/
public String startCamera(CameraCaptureMode incCaptureMode) {
/********************************************
* initiate Camera
********************************************/
CameraCaptureDialog ccd = new CameraCaptureDialog();

/********************************************
* Camera Settings
********************************************/
ccd.Mode = incCaptureMode;
ccd.Resolution = _CaptureSettings.Default_PictureSize;
ccd.StillQuality = _CaptureSettings.Default_Quality;
ccd.InitialDirectory = _Settings.Photo_DIRECTORY;

/********************************************
* Display Camera
********************************************/
ccd.ShowDialog();
return ccd.FileName;
}/************* End-Method ************/



Smart Device Development19  
 
 
_Stoic





PostPosted: .NET Compact Framework, Camera API's stopped working Top

seems to die on the CameraCaptureDialog.ShowDialog(); line,
I have checked the API's and they haven’t changed..

The code worked perfectly before the update to NetCF2.0 SP1, bug maybe


 
 
Ilya Tumanov





PostPosted: .NET Compact Framework, Camera API's stopped working Top

Can you run it on emulator or another device What is the stack trace



 
 
_Stoic





PostPosted: .NET Compact Framework, Camera API's stopped working Top

Don't think it's the code as its fairly simple Camera capture code that I have used in numerous projects and which has been working for the last few months..

I was previously running it on NetCF2.0, then NetCF2.0 SP1 (Beta) without any difficulties, its only after upgrading to NetCF2.0 SP1 (Release) did it stop working, the new version of compact framework itself was installed successfully as all my .Net apps seem to work fine, its just the ones that use camera capture that fail..

Stack Trace
==========================
System.InvalidOperationExceptoion: {"An unknown error occurred."}
InnerException: null
Message: "An unknown error occurred."
StackTrace: "at Microsoft.WindowsMobile.Forms.CameraCaptureDialog.LaunchCameraCaptureDialog()\r\nat Microsoft.WindowsMobile.Forms.CameraCaptureDialog.ShowDialog()\r\nat NCamera.Camera.startCamera()\r\nat NCap.Screen.Btn_TakePicture_Click()\r\nat System.Windows.Forms.MenuItem.OnClick()\r\nat System.Windows.Forms.Menu.ProcessMnuProc()\r\nat System.Windows.Forms.Form.WnProc()\r\nat System.Windows.Forms.Control._InternalWnProc()\r\nat Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat System.Windows.Forms.Application.Run()\r\nat NCap.Program..ctor()\r\nat NCap.Program.Main()\r\n"


 
 
_Stoic





PostPosted: .NET Compact Framework, Camera API's stopped working Top

Just managed today to get my hands on another i-mate SP5 (not an easy task, these things are like hot cakes).. And the code ran perfectly, even after upgrading to SP1.. The camera app works fine when launched from the OS, but now any NETCF app that uses it fails with a System.InvalidOperationExceptoion: {"An unknown error occurred."}..

 

Tryed uninstalling and reinstalling all the following NETCF 2.0, NECF 2.0 SP1 (beta) and NETCF 2.01 SP1 (releae), currently back to NETCF 2.01 SP1 (release).. but didnt seem to fix the problem..

 

Seems ive managed to some how destroy my camera API!!

Any sugestions bar a full OS/wipe/reinstall would be handy as my phone works great and that would be a last resort..

 


 
 
Ilya Tumanov





PostPosted: .NET Compact Framework, Camera API's stopped working Top

Yes, we could not reproduce this issue here and we don't see any changes between beta and release which are capable of causing it. Reset should fix it.



 
 
_Stoic





PostPosted: .NET Compact Framework, Camera API's stopped working Top

Had to do an OS wipe and re-install the NETCF, now alls working again..