Note that there are some explanatory texts on larger screens.

plurals
  1. POBug on submitted app binary but not in the simulator - CALayer position contains NaN
    text
    copied!<p>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.</p> <p>This bug (<em>see below</em>) makes the app crash. I was wondering 2 things.</p> <ol> <li><p>Can anyone spot the problem in the code below?</p></li> <li><p>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..</p></li> </ol> <p><strong>The Crash report in BugSense</strong></p> <pre><code>CALayer position contains NaN: [798 nan] Class: CALayerInvalidGeometry 0x00120e99 -[imageCroppingViewController imagePickerController:didFinishPickingMediaWithInfo:] (imageCroppingViewController.m:126) + 163481 </code></pre> <p><strong>The Code</strong></p> <pre><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]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload