views:

404

answers:

2

I am totally at a loss on this crash report. I have several fairly complicated apps already in the store and recently submitted an update to one of them. I promptly received the response it had been rejected for crashing on startup. They are using exactly the same SDK version as me, 3.1.2. After symbolicating the stack trace, this is what was crashing:

Process:         MyAppName [60]
Path:            /var/mobile/Applications/0EC19245-D3A4-47D0-94D9-XXXXXXXXXX/MyAppName.app/MyAppName
Identifier:      MyAppName
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-01-19 15:43:46.804 -0800
OS Version:      iPhone OS 3.1.2 (7D11)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

and this is the pertinent stack trace.

Thread 0 Crashed:
0   libSystem.B.dylib               0x0007e9ac __kill + 8
1   libSystem.B.dylib               0x0007e99c kill + 4
2   libSystem.B.dylib               0x0007e98e raise + 10
3   libSystem.B.dylib               0x0009363a abort + 34
4   libstdc++.6.dylib               0x000453b0 __gnu_cxx::__verbose_terminate_handler() + 376
5   libobjc.A.dylib                 0x00005858 _objc_terminate + 104
6   libstdc++.6.dylib               0x00043776 __cxxabiv1::__terminate(void (*)()) + 46
7   libstdc++.6.dylib               0x000437ca std::terminate() + 10
8   libstdc++.6.dylib               0x00043896 __cxa_throw + 74
9   libobjc.A.dylib                 0x00004714 objc_exception_throw + 64
10  Foundation                      0x000013c2 __NSThreadPerformPerform + 570
11  CoreFoundation                  0x00056a96 CFRunLoopRunSpecific + 1834
12  CoreFoundation                  0x00056356 CFRunLoopRunInMode + 42
13  GraphicsServices                0x00003cb8 GSEventRunModal + 108
14  GraphicsServices                0x00003d64 GSEventRun + 56
15  UIKit                           0x00002768 -[UIApplication _run] + 384
16  UIKit                           0x0000146c UIApplicationMain + 688
17  MyAppName                         0x0000ed6a main (main.m:13)
18  MyAppName                         0x000028e4 start + 44

To me that stacktrace is near useless, it just says a component crashed when we started your app yet I can not reproduce it on a similar system (the only difference being they are running Snow Leopard and I am just running Leopard).

Any suggestions as to what I could next? Thanks.

+3  A: 
  1. If you are running Snow Leopard, turn on the Static Analyzer in your project.
  2. Turn on NSZombieEnabled http://www.frogameleon.com/blog/last-night-an-iphone-zombie-nszombieenabled-saved-my-life
  3. Review the other Debugging docs and use the tools Apple provides. http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/130-Debugging_Applications/debugging_applications.html
David Sowsy
+1  A: 

Actually it doesn't say a component crashed when you started the app. The crash may have happened at any point.

What it does say though, is that it crashed in NSThreadPerform, which seems like you were trying to call performSelector on either an object that no longer existed, or possibly against an object that did not have the method you were trying to invoke.

So I'd look for anywhere you use performSelector on the main thread, and try and think from there how the target could be invalid.

Kendall Helmstetter Gelner
Thanks for the suggestion, but doesn't following the trace back suggest that the call didn't come from my code, the only thing my app invokes is to start at UIApplicationMain.
wicheda
If you look at main.m, what you see there is that it basically loops forever - all traces start in main because that is the runloop that calls everything. When you are calling something like performSelector:withDelay:, it adds a selector to call to a queue and when you are done with the current call it returns to the main loop, which then sees there's a selector to call and tries calling that - which in your app crashes. So you have to figure out what put up a selector to call.
Kendall Helmstetter Gelner
It could possibly a notification, or even an NSURL connection callback. The fact it is a crash says to me the object that was supposed to be called no longer exists, if you just tried to call a bad selector you would see a message not recognized exception instead...
Kendall Helmstetter Gelner