Apple rejected my app two times due to a crash at launch. I have tested it many times on different devices (iPhone 4, iPhone3GS, Simulator, iPad2) and it never crashed.
EDIT: This is a part of the symbolicated crash log.
Thanks!
Incident Identifier: DD9A5C38-DFE5-4CB5-A15B-8C55967FFFD1
CrashReporter Key: bf318d2d968114ff69d458c2f8cbdc6b869e1ec7
Hardware Model: iPhone3,1
Process: iMetroRoma [2788]
Path: /var/mobile/Applications/8EC59E9D-D070-4CAD-892E-91BCE94AA58C/iMetroRoma.app/iMetroRoma
Identifier: iMetroRoma
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-10-24 13:23:22.895 -0700
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x30d828bf __exceptionPreprocess + 163
1 libobjc.A.dylib 0x37f271e5 objc_exception_throw + 33
2 CoreFoundation 0x30ccbb6b -[__NSArrayM objectAtIndex:] + 271
3 iMetroRoma 0x0000426f 0x1000 + 12911
4 CoreLocation 0x34fbc5df -[CLLocationManager onClientEventLocation:] + 1171
5 CoreLocation 0x34fbbf81 -[CLLocationManager onClientEvent:supportInfo:] + 201
6 CoreLocation 0x34fb662f __CLClientInvokeCallback_block_invoke_0 + 55
7 CoreFoundation 0x30d56b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 13
8 CoreFoundation 0x30d5615f __CFRunLoopDoBlocks + 159
9 CoreFoundation 0x30d55381 __CFRunLoopRun + 1433
10 CoreFoundation 0x30cd84dd CFRunLoopRunSpecific + 301
11 CoreFoundation 0x30cd83a5 CFRunLoopRunInMode + 105
12 GraphicsServices 0x33906fed GSEventRunModal + 157
13 UIKit 0x32d4a743 UIApplicationMain + 1091
14 iMetroRoma 0x000024e3 0x1000 + 5347
15 iMetroRoma 0x0000249c 0x1000 + 5276
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3206732c __pthread_kill + 8
1 libsystem_c.dylib 0x3655df54 pthread_kill + 48
2 libsystem_c.dylib 0x36556fe4 abort + 88
3 libc++abi.dylib 0x31a1ff64 abort_message + 40
4 libc++abi.dylib 0x31a1d346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x37f272dc _objc_terminate + 140
6 libc++abi.dylib 0x31a1d3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x31a1d44a std::terminate() + 14
8 libc++abi.dylib 0x31a1e81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x37f2722e objc_exception_rethrow + 6
10 CoreFoundation 0x30cd853e CFRunLoopRunSpecific + 398
11 CoreFoundation 0x30cd839e CFRunLoopRunInMode + 98
12 GraphicsServices 0x33906fe6 GSEventRunModal + 150
13 UIKit 0x32d4a73c UIApplicationMain + 1084
14 iMetroRoma 0x000024dc 0x1000 + 5340
15 iMetroRoma 0x00002494 0x1000 + 5268
...
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3f54dce8 r6: 0x00000002 r7: 0x2fdffa6c
r8: 0x001a1c20 r9: 0x31a20a4a r10: 0x0000d224 r11: 0x0000cbfc
ip: 0x00000148 sp: 0x2fdffa60 lr: 0x3655df5b pc: 0x3206732c
cpsr: 0x00000010
...
Okay, did you "build and archive" when submitting to appstore?
If you did not, tough luck. There is not much you can do now. Even if you did Build and Archive, and lost the archive, you are out of luck.
If you did however, store the archive file of distribution build, very good!
Have you tried opening this in XCode Organizer (drag and drop the file onto organizer, it should try to symbolicate the crashlog). If not, do it.
When you do it, there are two possibilities:
Either the iMetroRoma functions will get symbolicated (meaning you'll see which line is crashing it) or it wont.
X*: If it does, you know where the application is crashing. Posting the details of that would help us solve the issue for you.
If it does not, then automatic symbolication in XCode is not working. Follow these steps (assuming you did all this from XCode 4):
From /Users/your_username/Library/Developer/Xcode/DerivedData remove
all folders.
From /Users/your_username/Library/Application
Support/iPhone Simulator remove all folders.
Clean your trash.
And then try deleting that crash log from XCode Organizer and drag/drop it again there. Possibly, it might symbolicate it now. If it does do step X*, If it does not, read on.
Now, you will need to do follow the steps on this blog. (Very useful and well documented article).
Hopefully, it will symbolicate now and then move to step X*. If it does not, I'm sorry for not being able to help :)
According to the crash log, it looks like an array out of bounds exception. This means that you accessed an array with an index that doesn't exist. Unfortunately, the most important line (3 iMetroRoma 0x0000426f 0x1000 + 12911
) is not symbolicated which means you have to go hunting for all your calls to objectAtIndex: and think about whether there's a possibility that an invalid index could be used.
Related
Apple rejected our iphone app, showing that it crashed on iPad. We could not reproduce the crash on 3 different iPads and asked them to confirm. Apple came back saying that they produced the crash on iPhone 4 (although the log shows iPhone 3). We can not reproduce it...
They produce the crash by: Launch app. Select Let me look around
first. App crashes.
The log they sent us back seems to not show any of the apps own methods called:
ncident Identifier: 8B5E90DE-99FD-4279-B634-2C777209F2B3
CrashReporter Key: 6e9ccd0fcdc29915ebe22fb7376bd343cdcc252a
Hardware Model: iPhone3,1
Process: Snug [297]
Path: /var/mobile/Applications/DB3EFF00-7E5E-492A-9108-1341B6371B0D/Snug.app/Snug
Identifier: Snug
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-09-09 13:00:32.642 -0700
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 6
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x319e7660 __semwait_signal_nocancel + 24
1 libsystem_c.dylib 0x3410b4da nanosleep$NOCANCEL + 118
2 libsystem_c.dylib 0x340dd3a0 usleep$NOCANCEL + 44
3 libsystem_c.dylib 0x340dd2b6 abort + 118
4 Snug 0x001f8760 uncaught_exception_handler + 12
5 CoreFoundation 0x37830950 __handleUncaughtException + 68
6 libobjc.A.dylib 0x3553533e _objc_terminate + 122
7 libc++abi.dylib 0x36f683be safe_handler_caller(void (*)()) + 70
8 libc++abi.dylib 0x36f6844a std::terminate() + 14
9 libc++abi.dylib 0x36f6981e __cxa_rethrow + 82
10 libobjc.A.dylib 0x355352a2 objc_exception_rethrow + 6
11 CoreFoundation 0x37786506 CFRunLoopRunSpecific + 398
12 CoreFoundation 0x37786366 CFRunLoopRunInMode + 98
13 GraphicsServices 0x33f45432 GSEventRunModal + 130
14 UIKit 0x31532cce UIApplicationMain + 1074
15 Snug 0x000f590c main (main.m:16)
16 Snug 0x000f58c0 start + 32
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x319d73a8 kevent + 24
1 libdispatch.dylib 0x3095cea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x3095cbc2 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x319e7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3409ff36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x3409fcc8 start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x319e7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3409ff36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x3409fcc8 start_wqthread + 0
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x319d7004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x319d71fa mach_msg + 50
2 CoreFoundation 0x378043ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37803124 __CFRunLoopRun + 876
4 CoreFoundation 0x3778649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37786366 CFRunLoopRunInMode + 98
6 WebCore 0x3312fc9c RunWebThread(void*) + 396
7 libsystem_c.dylib 0x340a572e _pthread_start + 314
8 libsystem_c.dylib 0x340a55e8 thread_start + 0
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x319d7004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x319d71fa mach_msg + 50
2 CoreFoundation 0x378043ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x37803124 __CFRunLoopRun + 876
4 CoreFoundation 0x3778649e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x37786366 CFRunLoopRunInMode + 98
6 Foundation 0x38016bb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x38016a7a -[NSThread main] + 66
8 Foundation 0x380aa58a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x340a572e _pthread_start + 314
10 libsystem_c.dylib 0x340a55e8 thread_start + 0
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x319e7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3409ff36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x3409fcc8 start_wqthread + 0
Thread 7:
0 libsystem_kernel.dylib 0x319e7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3409ff36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x3409fcc8 start_wqthread + 0
Thread 8:
0 libsystem_kernel.dylib 0x319e7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3409ff36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x3409fcc8 start_wqthread + 0
Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x319e7570 __select + 20
1 CoreFoundation 0x3780863a __CFSocketManager + 726
2 libsystem_c.dylib 0x340a572e _pthread_start + 314
3 libsystem_c.dylib 0x340a55e8 thread_start + 0
Thread 6 crashed with ARM Thread State:
r0: 0x00000004 r1: 0x00000000 r2: 0x00000000 r3: 0x00000000
r4: 0x0c8cc800 r5: 0x0036a08c r6: 0x04339000 r7: 0x04338fe0
r8: 0x3f29fd30 r9: 0x00000000 r10: 0x3f29fd50 r11: 0x00000000
ip: 0x00000170 sp: 0x04338fc0 lr: 0x3409ff3d pc: 0x319e7cd4
cpsr: 0x40000010
Can anyone enlighten us with this crash report?
UPDATE:
We nagged the app review team to send us the console trace, they did. In the trace it was evident that a call is being made to a String category method that does not exists.
The fault was that the particular category implementation file was not added to our release target. So everything worked perfectly but when the app was archived an implementation file was missing.
Unfortunately this log doesn't look like it'll be too useful - it just shows the main thread handling an exception that's being re-thrown from another thread; that thread has gone off to do something else at the time of the log.
You mention your suspicion about the RestKit loop and the possibility NSOperation is throwing the exception. That's possible and worth putting a check in (and crossing your fingers that it doesn't break something else...), but it's probably time to beg the app review team to give you better steps to reproduce. See if you can pin down what you all are doing differently. I wish I had a better answer for you, but I think exploring all you can about what you're doing in the background while in this part of the app and trying to figure out the missing steps to reproduce is going to be your best bet. Good luck!
The crash happened in Thread 0 at the top most Snug line 4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x319e7660 __semwait_signal_nocancel + 24
1 libsystem_c.dylib 0x3410b4da nanosleep$NOCANCEL + 118
2 libsystem_c.dylib 0x340dd3a0 usleep$NOCANCEL + 44
3 libsystem_c.dylib 0x340dd2b6 abort + 118
4 Snug 0x001f8760 uncaught_exception_handler + 12
5 CoreFoundation 0x37830950 __handleUncaughtException + 68
6 libobjc.A.dylib 0x3553533e _objc_terminate + 122
7 libc++abi.dylib 0x36f683be safe_handler_caller(void (*)()) + 70
8 libc++abi.dylib 0x36f6844a std::terminate() + 14
9 libc++abi.dylib 0x36f6981e __cxa_rethrow + 82
10 libobjc.A.dylib 0x355352a2 objc_exception_rethrow + 6
11 CoreFoundation 0x37786506 CFRunLoopRunSpecific + 398
12 CoreFoundation 0x37786366 CFRunLoopRunInMode + 98
13 GraphicsServices 0x33f45432 GSEventRunModal + 130
14 UIKit 0x31532cce UIApplicationMain + 1074
15 Snug 0x000f590c main (main.m:16)
16 Snug 0x000f58c0 start + 32
There the app caused an exception which was not caught.
To symbolicate the report just drag it into xCode - you need to have the dSYM file for the reviewed version. Then xCode will show you the exact line where the problem occured. To get the dSym you need to "build and archive".
Also since the crash code is
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
the reason for the crash is a memory access problem. These kind of crash reports are generated in many cases where one tries to instert a nil object into an array or dictionary. (since the crash is in the main thread and not in Thread 6 as reported)
In your case I do not see any obvious insert, however I would check the logic starting in line 16 of your main file and all the subsequent. I would assume you are accessing an object which is not existent anymore at the time of this invokation.
You can analyze the crash report using the below
Steps to analyze crash report from apple:
Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.
OPEN terminal application and go to the folder created above (using CD command)
atos -arch armv7 -o YOURAPP.app/YOURAPP MEMORY_LOCATION_OF_CRASH. The memory location should be the one at which the app crashed as per the report.
Ex: atos -arch armv7 -o 'app name.app'/'app name' 0x0003b508
This would show you the exact line, method name which resulted in crash.
Ex: [classname functionName:]; -510
Symbolicating IPA
if we use IPA for symbolicating - just rename the extention .ipa with .zip , extract it then we can get a Payload Folder which contain app. In this case we don't need .dSYM file.
Link for this Symbolicating iPhone App Crash Reports
I've submitted my app to appstore for review and is refused as follows:
We found that your app crashed on iPhone 4 running iOS 5.1.1, which is
not in compliance with the App Store Review Guidelines. Your app
crashed on launch on both Wi-Fi and cellular networks.
And this is the attached crash log:
Incident Identifier: 65E8D233-2F02-4545-85C9-74CA4A346051
CrashReporter Key: 5f5257827e93649c799893055b12d3d61c937314
Hardware Model: iPhone3,1
Process: iman360 [42785]
Path: /var/mobile/Applications/EA2B491A-194D-4669-ADF7-721593D2B14F/iman360.app/iman360
Identifier: iman360
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-08-09 13:41:37.107 -0700
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fdfe6e0
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 ??? 0x2fdfe6e0 0 + 803202784
1 iman360 0x00036ba2 -[ComicCatController refreshWithActionHandlerExeced:] (ComicCatController.m:216)
2 iman360 0x00036b0c -[ComicCatController refresh] (ComicCatController.m:207)
3 iman360 0x0002e682 -[TabComicCityViewController showSegTabView:] (TabComicCityViewController.m:312)
4 iman360 0x0002dcbc -[TabComicCityViewController segmentedViewValueChanged:] (TabComicCityViewController.m:96)
5 CoreFoundation 0x372ee3f6 -[NSObject performSelector:withObject:withObject:] + 46
6 UIKit 0x31083e00 -[UIApplication sendAction:to:from:forEvent:] + 56
7 UIKit 0x31083dbc -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24
8 UIKit 0x31083d9a -[UIControl sendAction:to:forEvent:] + 38
9 UIKit 0x31083b0a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486
10 iman360 0x00019598 -[Iman360SegmentedView moveThumbToIndex:animate:] (Iman360SegmentedView.m:360)
11 iman360 0x00017ab4 -[Iman360SegmentedView willMoveToSuperview:] (Iman360SegmentedView.m:117)
12 UIKit 0x3106b502 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 390
13 UIKit 0x3106b370 -[UIView(Hierarchy) addSubview:] + 24
14 iman360 0x0002d996 -[TabComicCityViewController viewDidLoad] (TabComicCityViewController.m:49)
15 UIKit 0x310a1c84 -[UIViewController view] + 160
16 iman360 0x0001c86a +[ViewControllerManager initGlobalContentBgImgForViewController:] (ViewControllerManager.m:43)
17 iman360 0x0000422c -[Iman360ViewControllerBase init] (Iman360ViewControllerBase.m:25)
18 iman360 0x0002b8ce -[IndexTabViewControllerBase initWithIndexViewController:] (IndexTabViewControllerBase.m:19)
19 iman360 0x00004706 -[IndexViewController viewDidLoad] (IndexViewController.m:58)
20 UIKit 0x310a1c84 -[UIViewController view] + 160
21 UIKit 0x310a045a -[UIWindow addRootViewControllerViewIfPossible] + 38
22 UIKit 0x31224774 -[UIWindow setRootViewController:] + 332
23 iman360 0x0001c7da +[ViewControllerManager switchToViewController:] (ViewControllerManager.m:32)
24 iman360 0x0001c60a -[LoadingViewController onBackgroundJobFinishedWithUpdateInfo:] (LoadingViewController.m:165)
25 CoreFoundation 0x372f31f4 -[NSObject performSelector:withObject:] + 36
26 Foundation 0x37c0e740 __NSThreadPerformPerform + 344
27 CoreFoundation 0x37368acc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
28 CoreFoundation 0x37368298 __CFRunLoopDoSources0 + 208
29 CoreFoundation 0x3736703e __CFRunLoopRun + 646
30 CoreFoundation 0x372ea49e CFRunLoopRunSpecific + 294
31 CoreFoundation 0x372ea366 CFRunLoopRunInMode + 98
32 GraphicsServices 0x33aa9432 GSEventRunModal + 130
33 UIKit 0x31096cce UIApplicationMain + 1074
34 iman360 0x00004d5c main (main.m:23)
35 iman360 0x00002e60 0x1000 + 7776
Thread 0 crashed with ARM Thread State:
r0: 0x2fdfe6bc r1: 0x2fdfe6bc r2: 0x2fdfe6e0 r3: 0x00000000
r4: 0x0015d980 r5: 0x00000001 r6: 0x00059384 r7: 0x2fdfe6e0
r8: 0x00059388 r9: 0x0000000e r10: 0x00153da0 r11: 0x314490ab
ip: 0x000249a1 sp: 0x2fdfe6e0 lr: 0x000249c1 pc: 0x2fdfe6e0
cpsr: 0x200f0010
But I've tested it on my iphone 4s & ipad, and it works well there. At first I thought it might be I am dereferencing a null pointer but KERN_PROTECTION_FAILURE at 0x2fdfe6e0 shows it is not so. Any idea on this?
I've make a static code analysis, and get something. That's stupid. I've forgot to call the [super init] method with some of my class initializer. But would anyone please help analyze if this is the problem? Not sure if this is where the problem is, as the app is still under review by appstore.
Fortunately, my app get passed this time. It is because I didn't call [super init] for my customized class object initialization. I'm just very curious about why this happens that it works well some times.
I'm starting to get desperate and I need advice. Here's the situation:
My recently updated App has started to crash directly on startup on some devices.
It did not before the update.
I cannot replicate this, although I have exactly the same device and software version.
It does not matter if it is a fresh uninstall/install or update, it crashes anyways.
The crash logs do not tell me anything useful. Here is one, perhaps someone smarter than me knows what happened:
Incident Identifier: 52C11BF9-A202-4ECC-B227-4A57899CB2E1
CrashReporter Key: 3129de7e18ddccceb41bf4d0ad0465bc2e66df29
Hardware Model: iPhone3,1
Process: GT-BetApp [3364]
Path: /var/mobile/Applications/5E9BA5D7-4337-44CD-BDAB-CE653680EEB3/GT-BetApp.app/GT-BetApp
Identifier: GT-BetApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-01-24 18:59:34.573 +0100
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x344258bf __exceptionPreprocess + 163
1 libobjc.A.dylib 0x346751e5 objc_exception_throw + 33
2 CoreFoundation 0x344257b9 +[NSException raise:format:] + 1
3 CoreFoundation 0x344257db +[NSException raise:format:] + 35
4 UIKit 0x37a42747 -[UINib instantiateWithOwner:options:] + 1567
5 UIKit 0x37a43bb9 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 137
6 UIKit 0x3797ca45 -[UIApplication _loadMainNibFileNamed:bundle:] + 37
7 UIKit 0x37806227 -[UIApplication _loadMainInterfaceFile] + 223
8 UIKit 0x37800313 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 227
9 UIKit 0x377ce921 -[UIApplication handleEvent:withNewEvent:] + 1017
10 UIKit 0x377ce3bf -[UIApplication sendEvent:] + 55
11 UIKit 0x377cdd2d _UIApplicationHandleEvent + 5809
12 GraphicsServices 0x30c00df3 PurpleEventCallback + 883
13 CoreFoundation 0x343f9553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
14 CoreFoundation 0x343f94f5 __CFRunLoopDoSource1 + 141
15 CoreFoundation 0x343f8343 __CFRunLoopRun + 1371
16 CoreFoundation 0x3437b4dd CFRunLoopRunSpecific + 301
17 CoreFoundation 0x3437b3a5 CFRunLoopRunInMode + 105
18 UIKit 0x377ff457 -[UIApplication _run] + 551
19 UIKit 0x377fc743 UIApplicationMain + 1091
20 GT-BetApp 0x00002c79 main (main.m:15)
21 GT-BetApp 0x00002c44 0x1000 + 7236
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3634032c __pthread_kill + 8
1 libsystem_c.dylib 0x33209f54 pthread_kill + 48
2 libsystem_c.dylib 0x33202fe4 abort + 88
3 libc++abi.dylib 0x3384cf64 abort_message + 40
4 libc++abi.dylib 0x3384a346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x346752dc _objc_terminate + 140
6 libc++abi.dylib 0x3384a3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3384a44a std::terminate() + 14
8 libc++abi.dylib 0x3384b81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x3467522e objc_exception_rethrow + 6
10 CoreFoundation 0x3437b53e CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3437b39e CFRunLoopRunInMode + 98
12 UIKit 0x377ff450 -[UIApplication _run] + 544
13 UIKit 0x377fc73c UIApplicationMain + 1084
14 GT-BetApp 0x00002c72 main (main.m:14)
15 GT-BetApp 0x00002c3c 0x1000 + 7228
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x363303b4 kevent + 24
1 libdispatch.dylib 0x3705ae78 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x3705ab96 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x36340cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x331c630a _pthread_wqthread + 610
2 libsystem_c.dylib 0x331c609c start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x36340cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x331c630a _pthread_wqthread + 610
2 libsystem_c.dylib 0x331c609c start_wqthread + 0
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x36330010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36330206 mach_msg + 50
2 CoreFoundation 0x343f941c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x343f8154 __CFRunLoopRun + 876
4 CoreFoundation 0x3437b4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3437b39e CFRunLoopRunInMode + 98
6 WebCore 0x3684f128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x331cbc16 _pthread_start + 314
8 libsystem_c.dylib 0x331cbad0 thread_start + 0
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3eaf3ce8 r6: 0x00000002 r7: 0x2fdffa60
r8: 0x3fd97dec r9: 0x3384da4a r10: 0x0015d9e0 r11: 0x00156150
ip: 0x00000148 sp: 0x2fdffa54 lr: 0x33209f5b pc: 0x3634032c
cpsr: 0x00000010
As the only reference to my code in the report is to main.m, here it is:
#import <UIKit/UIKit.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
So here is my question: How can I determine the cause? What can I do to get more information on this crash (I can send versions to someone who experiences this crash)? What can I do to prevent it?
Any advice is much appreciated and thank you in advance!
UPDATE:
I found the solution and it was a silly mistake on my part.
The MainWindow.xib could not load when there was no localization for the device's language. I always thought, it would fall back English, but it did not (anymore).
In previous versions, this was never an issue. I don't know why this behavior changed.
Thanks for all the replies, you helped me search in the right direction!
The application is trying to read the main nib file, as specified in your app's Info.plist file.
In the plist file there is an entry like
NSMainNibFile -> MyMainWindow
which UIApplicationMain uses to load your initial view controller from. This file seems to be damaged. A common error is to use a custom class for a contained object and then change/remove that class later without changing the nib file.
To further understand the error it would be very helpful to know the description of the exception that's being raised. You'll find that in the console log.
Here is the crash report, the only entry of my app are the last two lines of the Thread 0 that crashed. Is it possible to get to the bottom of this crash?
CrashReporter Key: 4cc3bf614179cfc630ec151430177d3d47175000
Hardware Model: iPad2,1
Process: MyApp [750]
Path: /var/mobile/Applications/96D92A43-EA51-4988-88ED-AFDF005995DF/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-11-20 09:19:34.803 -0600
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
(0x37ee18bf 0x37a2d1e5 0x37ee17b9 0x37ee17db 0x35178cab 0x15b53 0x12ded 0x319c27ff 0x2c4b 0x3520550f 0x37ead577 0x37e390cf 0x351793fb 0xb66d 0x31a3c565 0x31ab4ce7 0x35211943 0x37eb5a63 0x37eb56c9 0x37eb429f 0x37e374dd 0x37e373a5 0x37c0efcd 0x319b7743 0x2585 0x2550)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3054232c 0x30531000 + 70444
1 libsystem_c.dylib 0x379e3f54 0x37996000 + 319316
2 libsystem_c.dylib 0x379dcfe4 0x37996000 + 290788
3 libc++abi.dylib 0x3043ef64 0x30438000 + 28516
4 libc++abi.dylib 0x3043c346 0x30438000 + 17222
5 libobjc.A.dylib 0x37a2d2dc 0x37a24000 + 37596
6 libc++abi.dylib 0x3043c3be 0x30438000 + 17342
7 libc++abi.dylib 0x3043c44a 0x30438000 + 17482
8 libc++abi.dylib 0x3043d81e 0x30438000 + 22558
9 libobjc.A.dylib 0x37a2d22e 0x37a24000 + 37422
10 CoreFoundation 0x37e3753e 0x37e28000 + 62782
11 CoreFoundation 0x37e3739e 0x37e28000 + 62366
12 GraphicsServices 0x37c0efc6 0x37c0b000 + 16326
13 UIKit 0x319b773c 0x31986000 + 202556
14 MyApp 0x0000257e main (main.m:14)
15 MyApp 0x00002548 start + 32
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x305323b4 0x30531000 + 5044
1 libdispatch.dylib 0x30a9df74 0x30a9a000 + 16244
2 libdispatch.dylib 0x30a9dc92 0x30a9a000 + 15506
Thread 2:
0 libsystem_kernel.dylib 0x30542cd4 0x30531000 + 72916
1 libsystem_c.dylib 0x379a030a 0x37996000 + 41738
2 libsystem_c.dylib 0x379a009c 0x37996000 + 41116
Thread 3:
0 libsystem_kernel.dylib 0x30542cd4 0x30531000 + 72916
1 libsystem_c.dylib 0x379a030a 0x37996000 + 41738
2 libsystem_c.dylib 0x379a009c 0x37996000 + 41116
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x30532010 0x30531000 + 4112
1 libsystem_kernel.dylib 0x30532206 0x30531000 + 4614
2 CoreFoundation 0x37eb541c 0x37e28000 + 578588
3 CoreFoundation 0x37eb4154 0x37e28000 + 573780
4 CoreFoundation 0x37e374d6 0x37e28000 + 62678
5 CoreFoundation 0x37e3739e 0x37e28000 + 62366
6 WebCore 0x3290e128 0x32866000 + 688424
7 libsystem_c.dylib 0x379a5c16 0x37996000 + 64534
8 libsystem_c.dylib 0x379a5ad0 0x37996000 + 64208
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000006 r5: 0x3f7c2ce8 r6: 0x00000002 r7: 0x2fdffa6c
r8: 0x00000001 r9: 0x00000000 r10: 0x00000000 r11: 0x35cf9201
ip: 0x00000148 sp: 0x2fdffa60 lr: 0x379e3f5b pc: 0x3054232c
cpsr: 0x000f0010
You need to symbolicate the "Last Exception backtrace" to find out where in your app that crash happened.
To do that open terminal and go to the directory where the dSYM of that app version is located:
atos -arch armv7 -o your.app.dSYM/Contents/Resource/DWARF/binary 0x15b53 0x12ded 0x2c4b 0xb66d
Replace your.app.dSYM with the actual filename and binary with the filename inside the dSYM package in this directory) using the addresses in the apps address range (which you can find lower in the crash report below Binary Images). I added the ones which seem to be in it.
You can catch those crash reports yourself by using the open source PLCrashReporter framework and some other tools/services on top of it. Some even support automatic symbolication. I mentioned some options in this answer: https://stackoverflow.com/q/8242215/474794
For your kind of crash, it is important to know the last exception backtrace, or even other than the main thread. Only PLCrashReporter based solutions will provide you the information for that!
Since the error is SIGABRT, I would suggest checking all of your variables for leaks. I got this error all of the time when I was first working on my applications.
The best way to check:
Open Finder>Macintosh HD>Developer>Applications>Instruments
In XCode, rather than running the app, select Profile with Instruments open. Instruments will then pop up and ask you what to analyze. From the iOS Simulator submenu, select Memory>Zombies add and record. Run through your application to the point where your app crashed and Instruments should tell you what was accessed at that time.
Hope this helps
On a general practicality note, if you are looking for a better way to test your apps, (before release) I would strongly suggest TestFlight: https://testflightapp.com/
It permits 'on-the-fly' beta testing, and gives detailed crash reports such as this:
Device Name: iPhone
Model: iPhone 4
Version: 5.0
Language: en_US (English)
Carrier: Verizon
Timezone: EST
Architecture: armv7
Connection State: Cellular Active
Exception reason -[__NSCFArray objectAtIndex:]: index (0) beyond bounds (0)
Stacktrace (7) 0 Trail Tracker 0x0007ad89 +[TFCrashHandler backtrace] + 429
1 Trail Tracker 0x0007afc7 TFHandleExceptions + 35
2 CoreFoundation 0x34681987 __handleUncaughtException + 74
3 libobjc.A.dylib 0x3678c2d1 _objc_terminate + 128
4 libc++abi.dylib 0x372993c5 _ZL19safe_handler_callerPFvvE + 76
5 libc++abi.dylib 0x37299451 _ZdlPv + 0
6 libc++abi.dylib 0x3729a825 __cxa_current_exception_type + 0
7 libobjc.A.dylib 0x3678c235 objc_exception_rethrow + 12
8 CoreFoundation 0x345d7545 CFRunLoopRunSpecific + 404
9 CoreFoundation 0x345d73a5 CFRunLoopRunInMode + 104
10 GraphicsServices 0x34d4bfed GSEventRunModal + 156
11 UIKit 0x3613e743 UIApplicationMain + 1090
12 Trail Tracker 0x0001738b main (main.m:14)
13 Trail Tracker 0x00017344 start + 40
There is a lot that you can do with TestFlight, so check it out :)
PS: It's not my product, so sorry if it seems like I'm advertising/spamming. It's not my product, I just like it a lot. I thought that it pertained to this topic, due to the nature of the question. Cheers!
Would appreciate some insight isolating this, some semi-repeatable crashes in an iPhone app of moderate complexity ...
The crashes in question occur (sometimes, though not consistently) when pressing a UIButton on a particular screen within the app.
(Not sure yet, though the issue may be manifesting itself more under lower memory conditions.)
A typical crash log is excerpted below.
Without getting into a lot of unnecessary detail at this point -- based on the log below, which is typical of several -- would anyone have any insights as to the problem occurring, and where to look and/or how to further troubleshoot?
Any help is very much appreciated!
Thanks.
~~~
Incident Identifier: ...
CrashReporter Key: ...
Process: AppName [1532]
Path: /var/mobile/Applications/12345678-9ABC-DEF0-1234-56789ABCDEF0/AppName.app/AppName
Identifier: AppName
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2010-01-05 18:20:28.081 -0800
OS Version: iPhone OS 3.0.1 (7A400)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x30011944 objc_msgSend + 24
1 UIKit 0x3096e0d0 -[UIApplication sendAction:to:from:forEvent:] + 128
2 UIKit 0x3096e038 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
3 UIKit 0x3096e000 -[UIControl sendAction:to:forEvent:] + 44
4 UIKit 0x3096dc58 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 528
5 UIKit 0x309a660c -[UIControl touchesBegan:withEvent:] + 260
6 UIKit 0x30935100 _UIGestureRecognizerUpdateObserver + 2136
7 CoreFoundation 0x3020cd8a __CFRunLoopDoObservers + 466
8 CoreFoundation 0x3025488c CFRunLoopRunSpecific + 1812
9 CoreFoundation 0x30254164 CFRunLoopRunInMode + 44
10 GraphicsServices 0x3204529c GSEventRunModal + 188
11 UIKit 0x308f0374 -[UIApplication _run] + 552
12 UIKit 0x308eea8c UIApplicationMain + 960
13 AppName 0x00002090 0x1000 + 4240
14 AppName 0x0000202c 0x1000 + 4140
Thread 1:
0 libSystem.B.dylib 0x31d47158 mach_msg_trap + 20
1 libSystem.B.dylib 0x31d49ed8 mach_msg + 60
2 CoreFoundation 0x3025454e CFRunLoopRunSpecific + 982
3 CoreFoundation 0x30254164 CFRunLoopRunInMode + 44
4 WebCore 0x3588dbc8 __ZL12RunWebThreadPv + 412
5 libSystem.B.dylib 0x31d705a0 _pthread_body + 20
Thread 0 crashed with ARM Thread State:
r0: 0x0019e420 r1: 0x30128c94 r2: 0x00014fac r3: 0x001ce9a0
r4: 0x001a56e4 r5: 0x00000000 r6: 0x00000000 r7: 0x2ffff1e0
r8: 0x00014fac r9: 0x001a97c0 r10: 0x001ce9a0 r11: 0x00000001
ip: 0x388ed9f0 sp: 0x2ffff1b8 lr: 0x3096e0d8 pc: 0x30011944
cpsr: 0x200f0010
~~~
EXC_BAD_ACCESS + objc_msgSend almost always equal a message sent to a deallocated object.
Run the static analyzer and it should help.
Also enabling NSZombies.
Then debug and have fun!