views:

205

answers:

1

We recently put an update out for one of our apps and many users told us that they could no longer run the app because it crashed on startup.

We have been able to recreate the crash by building and running the previous release build onto a device and then building and running the new build overtop of it on the same device, but the stack trace for this crash is very strange:

Thread 0 Crashed:
0   libSystem.B.dylib             0x000791d0 __kill + 8
1   libSystem.B.dylib             0x000791c0 kill + 4
2   libSystem.B.dylib             0x000791b2 raise + 10
3   libSystem.B.dylib             0x0008d6fa abort + 50
4   GraphicsServices              0x00003aa8 GSRegisterPurpleNamedPort + 172
5   GraphicsServices              0x00003d5a GSEventInitialize + 150
6   UIKit                         0x00004cd6 UIApplicationMain + 350
7   MyApp                         0x0000df5c main (main.m:14)
8   MyApp                         0x00002c84 start + 32

It appears to be crashing in the UIApplicationMain method that main calls. But it crashes before it reaches any of the methods in our app delegate. I have put breakpoints in all of the app delegate methods and none of them are reached.

In addition, this appears to be only occurring for users that are updating the app. Users that are downloading it from the app store without it already being on their iPhones are not seeing the problem.

Has anyone ever encountered a crash like this? Why would this problem only occur for updates?

A: 

Is this under iOS 4.0? This type of error had been reported to occur when a process or thread from the previous install of this app has crashed and somehow hasn't been cleaned up by the OS yet or has hung up in the debugger.

Does a reboot of the iPhone after installation of the new version of the app cause this error to go away? That would be one good indication that something is stuck/corrupted in the OS from the previous install, rather than in the app bundle itself.

hotpaw2
Yes, this appears to be happening under iOS 4.0.x. It's unlikely that the app crashed and hasn't been cleaned up on so many devices, but it could have been in the background in standby mode on many devices at the time the update occurred.After rebooting my dev device, I can no longer recreate the problem using the method I described. I'm wondering if there's anything I can do to fix the problem for our users though. I would rather not ask them to reboot their phones and/or delete it and reinstall it.
derekvanvliet
If reseting the device before or just after installing the new version of your app fixes the problem, the problem is possibly with your previous version of the app not exiting background/suspend mode properly; it's obviously too late to fix whatever serious kernel lockup that may be causing. You might want to submit the old version of your app to Apple in an OS bug report.
hotpaw2