2

I'm trying to convert an app from 32-bit app to 64-bit. I've had issues with TestFlight beta testers' apps crashing immediately, before the crash could be logged to TestFlight (or now, iTunes connect.) The app launch screen displays for a moment, and then a black screen is shown and the app closes.

If I put the user back on a 32-bit build, they don't have any problems and their user defaults and core data are intact.

Not only are the crashes not being logged, but this issue doesn't happen when the app is run from XCode. I've been able to replicate the issue a couple times by downloading an old version of the app from TestFlight, loading an old app container, and then upgrading to the 64 bit version. I haven't been able to debug the issue though, because I haven't been able to replicate it in XCode. Any ideas?

DivideByZer0
  • 745
  • 8
  • 26
  • 1
    What are you doing in your `appDelegate` or your `viewDidLoad` on your first view controller? – Robotic Cat Mar 08 '15 at 01:23
  • I commented out all the startup code in AppDelegate, to create a "safe mode" version of the app, which does start without the crash. Thanks for the advice, I was worried it would be something lower level than this... Now to narrow down the source of it! – DivideByZer0 Mar 17 '15 at 13:25
  • 1
    It shouldn't take long unless you have hundreds of lines of code. – Robotic Cat Mar 17 '15 at 15:40
  • Well, the issue only exists on test user devices that I don't have physical access to. So, it looks like I'll have to push builds to those users one by one, until I figure out the call that's causing the crash. – DivideByZer0 Mar 17 '15 at 21:47

2 Answers2

1

Under build settings try switch the optimization levels for debug to the same settings as release and try rebuild for debug.

Remember to switch back when you find the problems, its pretty frustrating developing with release type settings.

David Wong
  • 10,284
  • 3
  • 39
  • 34
  • Sorry for the delay; I've been having a lot of trouble connecting with iTunes Connect this week. I set the build scheme for release to Debug and set the flag for release rather than development mode so that iTunes Connect would accept it, but still no luck; the test users are still getting crashes. – DivideByZer0 Mar 15 '15 at 21:24
  • 1
    You should be testing the app yourself with these build changes. Switching anything under the debug flag doesn't affect test users unless the app was built via tethering. – David Wong Mar 16 '15 at 01:36
  • Good to know, thanks. Although I wasn't able to replicate the issue via tethering (in fact, it seemed to repair the issue.) Commenting out my whole appdelegate startup code removes the crash at leas though, so that will be a starting point for tracking down the issue. – DivideByZer0 Mar 17 '15 at 13:26
  • 1
    Totally weird! Good luck with hunting for the causes. – David Wong Mar 17 '15 at 21:52
1

It just so turns out that I was using a 32-bit iPod for debugging! I don't know why I didn't check this before, but using the code from this question:

Determine if iOS device is 32- or 64-bit

I discovered that my iPod, which I had assumed to be 64 bit, was actually 32 bit. So it goes...

The issue itself was happening at app startup during synchronization of MPMediaPlaylists with an internal database using their persistent IDs, which seemed to be handled or stored differently in 32 bit vs 64 bit.

Community
  • 1
  • 1
DivideByZer0
  • 745
  • 8
  • 26