App crashes on iPad running iOS6, complains about invalid geometry

  • 3
  • Problem
  • Updated 7 years ago
I've got an app that I'm testing on various platforms right now (app id #389991), and it seems to work well everywhere so far except an iPad running iOS6.

On an iOS6 iPad (iPad Mini, for what it's worth), the app crashes instantly with this information logged to the device console:

May 28 14:32:30 Kathryns-iPad lockdownd[45] <Notice>: 2fef5000 handle_get_value: HEY!!!!! SpringBoard attempting to get [NULL]:[UniqueDeviceID]- Use MGCopyAnswer(kMGQUniqueDeviceID) instead of lockdown please! <rdar://problem/10666716>
May 28 14:32:30 Kathryns-iPad amfid[32810] <Error>: May 28 14:32:30 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
May 28 14:32:30 Kathryns-iPad kernel[0] <Debug>: launchd[32809] Builtin profile: container (sandbox)
May 28 14:32:30 Kathryns-iPad kernel[0] <Debug>: launchd[32809] Container: /private/var/mobile/Applications/8588D62E-A96D-4F69-98DD-2EB02A65BC09 (sandbox)
May 28 14:32:30 Kathryns-iPad Reunion[32809] <Warning>: Multi-tasking -> Device: YES, App: YES
May 28 14:32:30 Kathryns-iPad Reunion[32809] <Error>: *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(0x3208a2a3 0x39f4597f 0x3208a1c5 0x33c3e97b 0x33c3e8a3 0x33c3e833 0x33e93aed 0x33e93815 0x33e93753 0x9d4d9 0x9d1eb 0x9cd77 0x9d63f 0xa367d 0xa38f1 0xa1d91 0x77fa5 0x33eb1595 0x33ef1d79 0x33eedaed 0x33f2f1e9 0x77d07 0x33ef2ad9 0x33ef2663 0x33eea84b 0x33e92c39 0x33e926cd 0x33e9211b 0x35b9d5a3 0x35b9d1d3 0x3205f173 0x3205f117 0x3205df99 0x31fd0ebd 0x31fd0d49 0x33ee9485 0x33ee6301 0x77ac7 0x77aa0)
May 28 14:32:31 Kathryns-iPad ReportCrash[32812] <Notice>: Formulating crash report for process Reunion[32809]
May 28 14:32:31 Kathryns-iPad com.apple.launchd[1] (UIKitApplication:com.alumnione.cornell.reunion[0xbbf8][32809]) <Warning>: (UIKitApplication:com.alumnione.cornell.reunion[0xbbf8]) Job appears to have crashed: Abort trap: 6
May 28 14:32:31 Kathryns-iPad ReportCrash[32812] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
May 28 14:32:31 Kathryns-iPad backboardd[27] <Warning>: Application 'UIKitApplication:com.alumnione.cornell.reunion[0xbbf8]' exited abnormally with signal 6: Abort trap: 6
May 28 14:32:31 Kathryns-iPad ReportCrash[32812] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/Reunion_2013-05-28-143230_Kathryns-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
May 28 14:32:40 Kathryns-iPad profiled[32793] <Notice>: (Note ) profiled: Idled.
May 28 14:32:40 Kathryns-iPad profiled[32793] <Notice>: (Note ) profiled: Service stopping.


I've never seen this before, and from what I can tell via Google & Stack Overflow it would seem to be related to a NaN issue:

May 28 14:32:30 Kathryns-iPad Reunion[32809] <Error>: *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

Why would this only be an issue on the one device/OS combination? It works fine on an iPhone 4 with iOS 6 and an iPod Touch with iOS 6...
Photo of Adam Tuttle

Adam Tuttle

  • 134 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 3
Photo of Adam Tuttle

Adam Tuttle

  • 134 Posts
  • 0 Reply Likes
Downgrading my app to Phonegap 2.5 fixes this issue. Obviously something wrong with the 2.7 implementation on build.
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hey Adam,

I've notified one our our main IOS contributors on PhoneGap/Cordova. Hopefully, he'll be able to shed some light on this issue.

Hardeep Shoker
Photo of Shazron

Shazron, Developer Level 42

  • 37 Posts
  • 2 Reply Likes
I think this relates to the splashscreen transformations. Any commits on Feb 26 2013 (2.5.0 cutoff) and later might be the reason: https://github.com/apache/cordova-ios...

Adam, does this crash on 2.6.0 as well? That will limit the problem space for where I can isolate this.
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hey Shaz,

Sorry, we don't support 2.6.0 on Build, we jumped from 2.5.0 to 2.7.0. Would the project from Build be of any use?

@Adam, could you please explain how to recreate the issue. For example, does it occur if you hold it in Landscape/Portrait. I noticed you said right on launch.

Hardeep Shoker
Photo of Shazron

Shazron, Developer Level 42

  • 37 Posts
  • 2 Reply Likes
Oops, yeah I forgot Build skipped 2.6.0. Yeah, more details on the orientation at startup, what orientations are supported in the app would be great.
Photo of Code Summoner

Code Summoner

  • 3 Posts
  • 0 Reply Likes
Crashes in both orientations for me.
Photo of Adam Tuttle

Adam Tuttle

  • 134 Posts
  • 0 Reply Likes
Sorry for the delay. The crash happens regardless of orientation for me. I'm testing on an iPad Mini with iOS 6.1.3; and yeah, I can't (easily) create a build with 2.6 to test because we use Build exclusively for compiling.
Photo of Adam Tuttle

Adam Tuttle

  • 134 Posts
  • 0 Reply Likes
I've created app ID #423199 for your testing. It's a copy of the application where this issue originally came up, with the PG version set to 2.7 and the app id changed so that it won't conflict with the version of my app that I have to deliver with PG 2.5 shortly.

If you can get to the login screen you've fixed the bug. Hell, if you can see the splash screen it's probably fixed.

Let me know if there's anything else I can do to help debug.
Photo of Shazron

Shazron, Developer Level 42

  • 37 Posts
  • 2 Reply Likes
I downloaded the www for #423199, and made changes for it to work on a 2.7.0 Apache Cordova new project. Tested on an iPad mini with iOS 6.1.3 - I was able to reproduce the crash.

Note I looked at the config.xml - no iPad images were specified, and my project reflected it as well. Will let you know more info as I find the source of the crash.
Photo of Shazron

Shazron, Developer Level 42

  • 37 Posts
  • 2 Reply Likes
In investigating this, I found that it was already reported as:
https://issues.apache.org/jira/browse...

This is fixed in 2.8.0. Hardeep, the patch for older versions is:
http://goo.gl/KhvK6

Also, a workaround is to specify images for the iPad as well.
Photo of Code Summoner

Code Summoner

  • 3 Posts
  • 0 Reply Likes
Thanks Shazron
Photo of Adam Tuttle

Adam Tuttle

  • 134 Posts
  • 0 Reply Likes
Confirmed the workaround by adding ipad-specific images to the app. Thanks, Shaz!