Bug on submitted app binary but not in the simulator - CALayer position contains NaN
- by Jonathan Thurft
I submitted my app to the App Store where is ready to download. I've since then received some interesting crash reports when people select an image from the ImagePicker in one of my views.
This bug (see below) makes the app crash. I was wondering 2 things.
Can anyone spot the problem in the code below?
How do you deal with bugs that are only in the App Binary but do not show up when trying to recreate them on the dev environment? - I can make the app crash with the Binary that is on the app store but when I do the same on the simulator or on my test phone the app works perfectly..
The Crash report in BugSense
CALayer position contains NaN: [798 nan]
Class:
CALayerInvalidGeometry
0x00120e99 -[imageCroppingViewController imagePickerController:didFinishPickingMediaWithInfo:] (imageCroppingViewController.m:126) + 163481
The Code
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
imageView.image = image;
CGRect rect;
rect.size.width = image.size.width;
rect.size.height = image.size.height;
imageView.center = scrollView.center;
[imageView setFrame:rect];
scrollView.contentSize = imageView.frame.size;
self.navigationController.navigationBar.hidden = NO;
[myPicker.view removeFromSuperview];
}