Hello everybody,
I made a really simple camera app (it shoots a series of pictures in user-defined intervals), which was compiled for platform WP 7.1 (I think OS version 7.5 and 7.8) which works fine on my old ZTE Tania (it's running 7.8). I have uploaded it to the Store, it passed certification, but I see crashes under Windows Phone 8.1.
I see the following in the Dashboard:
Symbol Name:
Microsoft_Devices_Camera_ni!Microsoft.Devices.PhotoCamera.CheckInitAndCaptureComplete
Failure Name:
CLR_EXCEPTION_System.InvalidOperationException_80131509_Microsoft.Devices.Camera.dll!Microsoft.Devices.PhotoCamera.CheckInitAndCaptureComplete
I see, that somebody is using it under Windows 10 (Mobile) and there're no reported crashes for that system.
Is it a problem in code or some user-device specific issue?
This is my camera init code:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
sw = new Stopwatch();
timer = new DispatcherTimer();
timer.Tick += new EventHandler(timer_Tick);
cam = new Microsoft.Devices.PhotoCamera(CameraType.Primary);
currentPhotoPath = string.Empty;
lib = new MediaLibrary();
cam.CaptureCompleted += new EventHandler<CameraOperationCompletedEventArgs>(cam_CaptureCompleted);
cam.CaptureImageAvailable += new EventHandler<ContentReadyEventArgs>(cam_CaptureImageAvailable);
cam.Initialized += new EventHandler<CameraOperationCompletedEventArgs>(cam_Initialized);
viewFinderBrush.SetSource(cam);
CameraButtons.ShutterKeyHalfPressed += new EventHandler(CameraButtons_ShutterKeyHalfPressed);
CameraButtons.ShutterKeyPressed += new EventHandler(CameraButtons_ShutterKeyPressed);
}
and handler for camera initialized event:
void cam_Initialized(object sender, CameraOperationCompletedEventArgs e)
{
Dispatcher.BeginInvoke(() =>
{
availableSizes = new List<Size>(cam.AvailableResolutions);
resolutionPicker.ItemsSource = availableSizes;
IsolatedStorageSettings iss = IsolatedStorageSettings.ApplicationSettings;
flashPicker.SelectedIndex = iss.Contains(FLASH_SETTING) ? (int)iss[FLASH_SETTING] : 0;
resolutionPicker.SelectedIndex = iss.Contains(RESOLUTION_SETTING) ? (int)iss[RESOLUTION_SETTING] : availableSizes.Count - 1;
});
}
I have Visual Studio 2010 Express for Windows Phone installed and at this moment I can't install 8.1 tools to VS2013, but I don't know if repacking would help and I don't own 8.1 device to test it :) .
Thanks in advance!