My application uses the UIImagePicker to allow the user to use the camera and capture a photo to edit/etc. I am getting the error message below:
2010-02-03 10:41:24.018 LivingRoom[5333:5303] Failed to save the videos metadata to the filesystem. Maybe the information did not conform to a plist.
Program received signal: “EXC_BAD_ACCESS”.
A search in Google brings up a number of threads in various forums, with no ultimate response/root cause/suggestions on how to fix/debug. An example is the thread below with code which is very similar to my app:
http://groups.google.com/group/iphonesdkdevelopment/browse_thread/thread/6b7b396c62bef398
The error disappears for a while (10 tests in a row, no errors) if I reboot the iPhone. I have not been able to determine what makes it reoccur after a reboot, but it does. I am not using the video source and the fact that a reboot solves the problem for a while points to some sort of mem leak (perhaps?).
The problem always shows up on both the iPhone (even after the reboot) and the simulator when choosing a photo from the album, but the app does not crash on the iPhone or the simulator.
The same app with exact code did not have the error message when compiled using SDK 3.0 (last August/September). But 3.1.x has always pr开发者_Python百科oduced the error message, which means that once a week or so the iPhone needs to be rebooted for the error to disappear. The users are not happy with that solution any longer!!
Any suggestion/clues would be greatly appreciated.
I had the same problem, it was caused by incorrectly releasing some associated image data
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissModalViewControllerAnimated:TRUE];
UIImage* image = [info objectForKey:UIImagePickerControllerOriginalImage] ;
NSData *imageData = UIImageJPEGRepresentation(image, 0.9f);
// do things with the imageData
// {..}
// incorrect release caused the above error message for me
// [imageData release];
}
精彩评论