SIGSEGV SEGV_ACCERR Error - no method from app referenced - ios

There is no method from my app referenced in this crash report, and I have not been able to reproduce it. Several of my users are having the same crash. I can't find any tableview cells with a scrollview or any place where I use a spring. Where could this crash be coming from?
Incident Identifier: 748D4582-3868-42BD-BF98-B3B47895954D
CrashReporter Key: F7F44964-E877-4C7A-881C-91EBC4261080
Hardware Model: iPhone5,1
Process: MyApp [2415]
Path: /Users/USER/MyApp.app/MyApp
Identifier: com.mycom.myapp
Version: 1.5.1
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-11-21 05:30:47 +0000
OS Version: iPhone OS 7.0.4 (11B554a)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x5000000c
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3921fb66 objc_msgSend + 5
1 UIKit 0x3177e315 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 409
2 UIKit 0x317266cd -[UITableView _updateVisibleCellsNow:] + 1800
3 UIKit 0x31719f75 -[UITableView _visibleCells] + 24
4 UIKit 0x31783f13 -[UITableView indexPathForCell:] + 26
5 UIKit 0x31782289 -[UITableViewCell _canDoSeparatorLayout] + 64
6 UIKit 0x31781e19 -[UITableViewCell _updateSeparatorContent] + 56
7 UIKit 0x31844a3b -[UITableViewCell _updateViewsForDeleteButton] + 218
8 UIKit 0x3171c673 -[UITableViewCellScrollView setContentOffset:] + 186
9 UIKit 0x31880561 __43-[UITableViewCell _animateSwipeCancelation]_block_invoke + 81
10 UIKit 0x31681113 +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 490
11 UIKit 0x317a66ef +[UIView _animateUsing WithDuration:delay:options:mass:stiffness:damping:initialVelocity:animations:start:completion:] + 166
12 UIKit 0x317a663f +[UIView _animateUsingSpringWithDuration:delay:options:mass:stiffness:damping:initialVelocity:animations:completion:] + 90
13 UIKit 0x318804bf -[UITableViewCell _animateSwipeCancelation] + 278
14 UIKit 0x31850639 -[UITableView _endSwipeToDeleteRowDidDelete:] + 216
15 UIKit 0x31901873 -[UITableView willMoveToSuperview:] + 62
16 UIKit 0x318e1913 __UIViewWillBeRemovedFromSuperview + 151
17 UIKit 0x3164a091 -[UIView removeFromSuperview] + 56
18 UIKit 0x3171e431 -[UIScrollView removeFromSuperview] + 64
19 UIKit 0x3164c9b3 -[UIView dealloc] + 366
20 libobjc.A.dylib 0x39221023 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 359
21 CoreFoundation 0x2edfb1c9 _CFAutoreleasePoolPop + 16
22 CoreFoundation 0x2ee90e83 __CFRunLoopRun + 1315
23 CoreFoundation 0x2edfb471 CFRunLoopRunSpecific + 524
24 CoreFoundation 0x2edfb253 CFRunLoopRunInMode + 106
25 GraphicsServices 0x33b352eb GSEventRunModal + 138
26 UIKit 0x316b0845 UIApplicationMain + 1136
27 MyApp 0x000e810b main (main.m:5)
28 libdyld.dylib 0x3971dab7 start + 3
Thread 1:
0 libsystem_kernel.dylib 0x397c1838 kevent64 + 24
1 libdispatch.dylib 0x3970a623 _dispatch_mgr_thread + 39
Thread 2:
0 libsystem_kernel.dylib 0x397d4c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39838cc4 start_wqthread + 8
Thread 3:
0 libsystem_kernel.dylib 0x397d4c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39838cc4 start_wqthread + 8
Thread 4:
0 libsystem_kernel.dylib 0x397d4c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39838cc4 start_wqthread + 8
Thread 5:
0 libsystem_kernel.dylib 0x397c1a84 mach_msg_trap + 20
1 CoreFoundation 0x2ee92559 __CFRunLoopServiceMachPort + 157
2 CoreFoundation 0x2ee90c79 __CFRunLoopRun + 793
3 CoreFoundation 0x2edfb471 CFRunLoopRunSpecific + 524
4 CoreFoundation 0x2ee3f0db CFRunLoopRun + 98
5 CoreMotion 0x2f4b3369 CLSF_thorntonUpdate_6x6 + 57225
6 libsystem_pthread.dylib 0x3983ac5d _pthread_body + 141
7 libsystem_pthread.dylib 0x3983abcf _pthread_start + 102
8 libsystem_pthread.dylib 0x39838cd0 thread_start + 8
Thread 0 crashed with ARM Thread State:
pc: 0x3921fb66 r7: 0x27d21618 sp: 0x27d215f4 r0: 0x17f82270
r1: 0x31c343d7 r2: 0x189d9e00 r3: 0x17d46730 r4: 0x189d9e00
r5: 0x00000338 r6: 0x17e0e340 r8: 0x39e43294 r9: 0x50000000
r10: 0x17d46730 r11: 0x000001d0 ip: 0x39d3e220 lr: 0x3177e315
cpsr: 0x20000030

This is what I can see looking at the crash report:
The crash is caused bei SIGSEGV in objc_msgSend. This means the app is trying to send a message to an object that is invalid. This means you have at least one memory problem in your app (somewhere).
It looks like the problem happens when trying to delete a row in a tableView using the swipe to delete gesture, see -[UITableView _endSwipeToDeleteRowDidDelete:] showing up in the stack trace and additional hints above like -[UITableViewCell _animateSwipeCancelation], -[UITableViewCell _updateViewsForDeleteButton].
So it might be worth a try checking this use case in all table views in your app.
In addition use the Analyze feature of Xcode and fix all warnings it shows and also try running your app with Enable Zombie Objects set. There a lots of websites and also answers here on SO explaining how to do that.

Related

SIGSEGV Crash in thread 1, very small stack trace

Recently our released app have crashed several times with a stack trace that contain very little information to what the root cause can be. According to the crash log, the crash happens in thread 1, but this thread only have two calls. Could it be that the real problem is still in the main thread 0?
Could anyone suggest the best approach to find the background problem?
Hardware Model: iPhone6,2
Process: App [159]
Version: 0813 (1.3.2)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2014-08-16 16:51:48.114 +0200
OS Version: iOS 7.1.2 (11D257)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x00000001924901d0 objc_msgSend + 16
1 UIKit 0x0000000189026d94 -[UITableView _updateVisibleCellsNow:] + 1748
2 UIKit 0x0000000189026610 -[UITableView layoutSubviews] + 164
3 UIKit 0x0000000188f3afdc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 344
4 QuartzCore 0x0000000188b2c254 -[CALayer layoutSublayers] + 180
5 QuartzCore 0x0000000188b26e1c CA::Layer::layout_if_needed(CA::Transaction*) + 296
6 QuartzCore 0x0000000188b26cd4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
7 QuartzCore 0x0000000188b2655c CA::Context::commit_transaction(CA::Transaction*) + 276
8 QuartzCore 0x0000000188b26300 CA::Transaction::commit() + 420
9 QuartzCore 0x0000000188b1fc34 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 76
10 CoreFoundation 0x0000000185f37854 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
11 CoreFoundation 0x0000000185f34adc __CFRunLoopDoObservers + 368
12 CoreFoundation 0x0000000185e75df4 CFRunLoopRunSpecific + 488
13 GraphicsServices 0x000000018bb5dc08 GSEventRunModal + 164
14 UIKit 0x0000000188fa6fc0 UIApplicationMain + 1152
15 App 0x00000001000c8808 main (main.m:16)
16 libdyld.dylib 0x0000000192a73a9c start + 0
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x0000000192b55aa8 kevent64 + 8
1 libdispatch.dylib 0x0000000192a59998 _dispatch_mgr_thread + 48
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x0000000192b55ca0 mach_msg_trap + 8
1 CoreFoundation 0x0000000185f36d20 __CFRunLoopServiceMachPort + 180
2 CoreFoundation 0x0000000185f34eb0 __CFRunLoopRun + 832
3 CoreFoundation 0x0000000185e75dcc CFRunLoopRunSpecific + 448
4 Foundation 0x0000000186a6a424 +[NSURLConnection(Loader) _resourceLoadLoop:] + 344
5 Foundation 0x0000000186af8408 __NSThread__main__ + 996
6 libsystem_pthread.dylib 0x0000000192befe18 _pthread_body + 164
7 libsystem_pthread.dylib 0x0000000192befd70 _pthread_start + 13

App SIGABRT Crash

When I run my iOS app in Xcode & test it on my device (before submitting) it returns no errors and it works flawlessly. But when I test the app after the update to the app store, it crashes every time I open the app on my device. I get the following error in my crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2f9ecf06 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3a183ce2 objc_exception_throw + 34
2 CoreData 0x2f72a694 -[NSPersistentStoreCoordinator initWithManagedObjectModel:] + 392
3 TapNotes 0x00015d3c -[AppDelegate persistentStoreCoordinator] (AppDelegate.m:104)
4 TapNotes 0x00015b48 -[AppDelegate managedObjectContext] (AppDelegate.m:73)
5 TapNotes 0x00016904 -[DeviceViewController managedObjectContext] (HomeViewController.m:22)
6 TapNotes 0x00016b04 -[DeviceViewController viewDidAppear:] (HomeViewController.m:51)
7 UIKit 0x32236d1e -[UIViewController _setViewAppearState:isAnimating:] + 434
8 UIKit 0x322e6052 -[UINavigationController viewDidAppear:] + 178
9 UIKit 0x32236d1e -[UIViewController _setViewAppearState:isAnimating:] + 434
10 UIKit 0x3229be7a -[UIViewController _executeAfterAppearanceBlock] + 50
11 UIKit 0x3229be04 _applyBlockToCFArrayCopiedToStack + 312
12 UIKit 0x32214b6e _afterCACommitHandler + 454
13 CoreFoundation 0x2f9b8034 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
14 CoreFoundation 0x2f9b59c2 __CFRunLoopDoObservers + 282
15 CoreFoundation 0x2f9b5d0e __CFRunLoopRun + 734
16 CoreFoundation 0x2f920764 CFRunLoopRunSpecific + 520
17 CoreFoundation 0x2f920546 CFRunLoopRunInMode + 102
18 GraphicsServices 0x3488d6ce GSEventRunModal + 134
19 UIKit 0x3227f88c UIApplicationMain + 1132
20 TapNotes 0x00016886 main (main.m:16)
21 libdyld.dylib 0x3a681ab2 tlv_initializer + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3a7381f0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x3a7a07b2 pthread_kill + 54
2 libsystem_c.dylib 0x3a6e8ff4 abort + 72
3 libc++abi.dylib 0x39b3798a abort_message + 70
4 libc++abi.dylib 0x39b506e2 default_terminate_handler() + 250
5 libobjc.A.dylib 0x3a183f7a _objc_terminate() + 190
6 libc++abi.dylib 0x39b4e1b0 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x39b4dd12 __cxa_rethrow + 98
8 libobjc.A.dylib 0x3a183e2a objc_exception_rethrow + 38
9 CoreFoundation 0x2f9207da CFRunLoopRunSpecific + 638
10 CoreFoundation 0x2f920546 CFRunLoopRunInMode + 102
11 GraphicsServices 0x3488d6ce GSEventRunModal + 134
12 UIKit 0x3227f88c UIApplicationMain + 1132
13 TapNotes 0x00016886 main (main.m:16)
14 libdyld.dylib 0x3a681ab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3a725804 kevent64 + 24
1 libdispatch.dylib 0x3a674050 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a66e2de _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x3a738c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a79dc1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3a79dad8 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x3a738c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a79dc1e _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3a79dad8 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x3c69418c r6: 0x00000000 r7: 0x27df2594
r8: 0x17e8d090 r9: 0x00000001 r10: 0x0000000c r11: 0x00000002
ip: 0x00000148 sp: 0x27df2588 lr: 0x3a7a07b7 pc: 0x3a7381f0
cpsr: 0x00000010
I have tried opening on multiple devices & the same thing occurs. What should I do to resvole this issue?
From the look of the log you probably have the default Core Data stack in your code, and in the update modified your object model. You then have problems with migration on an version update. There in the Core Data template there is a nice call to abort() in the
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
method. There is a nice long comment about how it shouldn't appear in production code and some ideas on migration. I'd take a look in that method and verify the abort() is gone.

iPhone app crashes on some devices upon startup, but runs on others

We migrated an iOS 6 app to iOS 7 without altering anything in particular beyond some minor adjustments. We tested the app on the 3, 4, 4S and 5S iPhones and reported no problem.
Now two users are reporting that the app crashes upon startup. I advised one of them to remove the app altogether and install again which resulted in the app running smoothly.
He forwarded the crash log to me but it's a little cryptic. Can anyone help me pinpoint the issue?
EDIT: Symbolicated crash log
Incident Identifier: 687B278C-313F-4533-81E8-0003428A3362
CrashReporter Key: b25d61923c16e6a67af8ea7bf81643ba93f4d1ea
Hardware Model: iPhone4,1
Process: RunControl [3488]
Path: /var/mobile/Applications/DB78DB79-2AB2-4ADD-89C8-BACDBB6BCCF3/RunControl.app/RunControl
Identifier: com.gsddl.RunControl
Version: 1.5 (1.5)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-03-10 09:49:34.065 +0100
OS Version: iOS 7.0.6 (11B651)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 3
Last Exception Backtrace:
0 CoreFoundation 0x2dbbbf46 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x37f4b6aa objc_exception_throw + 34
2 CoreFoundation 0x2dbbbe88 +[NSException raise:format:] + 100
3 Foundation 0x2e4dd448 -[NSString stringByAppendingString:] + 84
4 RunControl 0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
5 Foundation 0x2e59fc82 __NSThread__main__ + 1058
6 libsystem_pthread.dylib 0x38572c18 _pthread_body + 136
7 libsystem_pthread.dylib 0x38572b8a _pthread_start + 98
8 libsystem_pthread.dylib 0x38570c8c thread_start + 4
Thread 0:
0 libsystem_kernel.dylib 0x38509014 0x384f7000 + 73748
1 libsystem_pthread.dylib 0x38572a74 pthread_create + 156
2 Foundation 0x2e50fb00 -[NSThread start] + 284
3 RunControl 0x000b20c4 -[RunControlAppDelegate initData] (RunControlAppDelegate.m:274)
4 RunControl 0x000b0f58 -[RunControlAppDelegate application:didFinishLaunchingWithOptions:] (RunControlAppDelegate.m:32)
5 UIKit 0x3039f2fa -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270
6 UIKit 0x3039ed4a -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1386
7 UIKit 0x3039934e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
8 UIKit 0x3033441a -[UIApplication handleEvent:withNewEvent:] + 3126
9 UIKit 0x3033371c -[UIApplication sendEvent:] + 68
10 UIKit 0x30398b38 _UIApplicationHandleEvent + 660
11 GraphicsServices 0x327cf70a _PurpleEventCallback + 606
12 GraphicsServices 0x327cf2f2 PurpleEventCallback + 30
13 CoreFoundation 0x2db869dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
14 CoreFoundation 0x2db86976 __CFRunLoopDoSource1 + 342
15 CoreFoundation 0x2db8514a __CFRunLoopRun + 1394
16 CoreFoundation 0x2daefc22 CFRunLoopRunSpecific + 518
17 CoreFoundation 0x2daefa06 CFRunLoopRunInMode + 102
18 UIKit 0x30397dd4 -[UIApplication _run] + 756
19 UIKit 0x30393044 UIApplicationMain + 1132
20 RunControl 0x000b0f1a main (main.m:16)
21 RunControl 0x000b0edc start + 36
Thread 1:
0 libsystem_kernel.dylib 0x384f783c 0x384f7000 + 2108
1 libdispatch.dylib 0x38442e08 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3843239e _dispatch_mgr_thread$VARIANT$up + 34
Thread 2:
0 libsystem_kernel.dylib 0x3850ac7c 0x384f7000 + 81020
1 libsystem_pthread.dylib 0x38570dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38570c80 start_wqthread + 4
Thread 3 Crashed:
0 libsystem_kernel.dylib 0x3850a1fc 0x384f7000 + 78332
1 libsystem_pthread.dylib 0x38573a2e pthread_kill + 54
2 libsystem_c.dylib 0x384baff8 abort + 72
3 libc++abi.dylib 0x377e9cd2 abort_message + 70
4 libc++abi.dylib 0x378026e0 default_terminate_handler() + 248
5 libobjc.A.dylib 0x37f4b91e _objc_terminate() + 190
6 libc++abi.dylib 0x378001c4 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x377ffa18 __cxa_throw + 112
8 libobjc.A.dylib 0x37f4b77e objc_exception_throw + 246
9 CoreFoundation 0x2dbbbe88 +[NSException raise:format:] + 100
10 Foundation 0x2e4dd448 -[NSString stringByAppendingString:] + 84
11 RunControl 0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
12 Foundation 0x2e59fc82 __NSThread__main__ + 1058
13 libsystem_pthread.dylib 0x38572c1a _pthread_body + 138
14 libsystem_pthread.dylib 0x38572b8a _pthread_start + 98
15 libsystem_pthread.dylib 0x38570c8c thread_start + 4
Thread 3 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x026f1000 r6: 0x00000000 r7: 0x026effb4
r8: 0x16dbd9d0 r9: 0x00000001 r10: 0x16d52ce0 r11: 0x00000000
ip: 0x00000148 sp: 0x026effa8 lr: 0x38573a33 pc: 0x3850a1fc
cpsr: 0x00000010
And RunControlAppDelegate.m (around 297):
[295] - (void) downloadData {
[296] NSString *stringURL = [config valueForKey:#"Users"];
[297] NSURL *url = [NSURL URLWithString:[self.URL stringByAppendingString:stringURL]];
[298] NSData *urlData = [NSData dataWithContentsOfURL:url];
...
I would venture to guess your update included 64 bit update iOS7 + iPhone5 and your data might be formatted with incorrect formatter:
ie: [NSString stringWithFormat:#"Some foo %d"];
This might work with 32 bit int but it will fail on a 64 bit platform.
Are there any warnings when you compile your binary?
The reference to stringURL was indeed nil which resulted in the crash. This was due to a silly race condition.

App Crash on setRightButton. No idea why

I trying to figure out why my App crashes sometimes on costumers devices. My App is from the AppStore. It happend not always, only in rare cases it seams.
Here is the used codeblock
[UIView animateWithDuration:0.3 animations:^(void){ [self.spinner setAlpha:0.0]; } completion:^(BOOL finished){
if(self.spinner != nil){
[self.spinner removeFromSuperview];
self.spinner = nil;
UIBarButtonItem *externButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:#selector(openBrowser)];
[self.navigationItem setRightBarButtonItem:externButton animated:YES];
}
}];
It crashes on setRightBarButtomItem:animated:. The codeblock is executed in an Background-Thread. Is that the Problem?
Here the crashlog:
Hardware Model: iPhone5,2
Process: [THE APP] [3052]
Path: (null)
Identifier: [THE APP]
Version: 3.9.0 (3.9.0)
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-11-09 16:07:04.000 +0100
OS Version: iPhone OS 7.0 (11A465)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x7000000c
Crashed Thread: 13
Thread 0:
0 CoreFoundation 0x30781224 __CFStringCreateImmutableFunnel3 + 1160
1 CoreFoundation 0x306dbf38 CFStringCreateWithBytes + 48
2 Foundation 0x310c49e8 -[NSPlaceholderString initWithBytes:length:encoding:] + 100
3 Foundation 0x310c4968 +[NSString stringWithUTF8String:] + 124
4 Foundation 0x310c48b0 NSStringFromClass + 128
5 UIKit 0x32fddb68 +[_UIAppearanceCustomizableClassInfo _customizableClassInfoForViewClass:withGuideClass:] + 260
6 UIKit 0x32fddd90 -[_UIAppearanceCustomizableClassInfo _superClassInfo] + 160
7 UIKit 0x32fddcc8 existingAppearancesNodesInNodeForClassAndSuperclasses + 136
8 UIKit 0x32fdd1d0 +[_UIAppearance _applyInvocationsTo:window:matchingSelector:] + 164
9 UIKit 0x32fdd120 +[_UIAppearance _applyInvocationsTo:window:] + 24
10 UIKit 0x32f32488 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 176
11 QuartzCore 0x32bb9f40 -[CALayer layoutSublayers] + 140
12 QuartzCore 0x32bb5760 CA::Layer::layout_if_needed(CA::Transaction*) + 344
13 UIKit 0x32f47410 -[UIView(Hierarchy) layoutBelowIfNeeded] + 532
14 UIKit 0x32fe9810 -[UIBarButtonItem(UIStatic) _leftRightImagePaddingForEdgeMarginInNavBarIsMini:] + 360
15 UIKit 0x32fcf140 -[UINavigationBar _getTitleViewFrame:leftViewFrames:rightViewFrames:forItemAtIndex:returnedIdealWidthOfTextContent:availableLayoutWidthForTextContent:idealBackButtonWidth:] + 2504
16 UIKit 0x32fc6e38 -[UINavigationBar _getTitleViewFrame:leftViewFrames:rightViewFrames:forItemAtIndex:] + 632
17 UIKit 0x32fc6bb8 -[UINavigationBar _getTitleViewFrame:leftViewFrames:rightViewFrames:] + 136
18 UIKit 0x32fcd080 -[UINavigationBar _setLeftViews:rightViews:] + 1248
19 UIKit 0x32fca2b8 -[UINavigationBar _pushNavigationItem:transition:] + 464
20 UIKit 0x32fc9e98 __71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 148
21 UIKit 0x32fe13a0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 868
22 UIKit 0x32fe0fe8 -[UINavigationController __viewWillLayoutSubviews] + 44
23 UIKit 0x32fe0f78 -[UILayoutContainerView layoutSubviews] + 180
24 UIKit 0x32f32530 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 344
25 QuartzCore 0x32bb9f40 -[CALayer layoutSublayers] + 140
26 QuartzCore 0x32bb5760 CA::Layer::layout_if_needed(CA::Transaction*) + 344
27 QuartzCore 0x32bb55f8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
28 QuartzCore 0x32bb5008 CA::Context::commit_transaction(CA::Transaction*) + 224
29 QuartzCore 0x32bb4e18 CA::Transaction::commit() + 308
30 QuartzCore 0x32baeb48 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 52
31 CoreFoundation 0x30777f70 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
32 CoreFoundation 0x307758f8 __CFRunLoopDoObservers + 280
33 CoreFoundation 0x30775c48 __CFRunLoopRun + 736
34 CoreFoundation 0x306e0540 CFRunLoopRunSpecific + 524
35 CoreFoundation 0x306e0320 CFRunLoopRunInMode + 104
36 GraphicsServices 0x354172e8 GSEventRunModal + 136
37 UIKit 0x32f971e0 UIApplicationMain + 1132
38 [THE APP] 0x00059f48 main (main.m:21)
Thread 1:
0 libsystem_kernel.dylib 0x3b043838 kevent64 + 24
1 libdispatch.dylib 0x3af8c640 _dispatch_mgr_thread + 36
Thread 2:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 3:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 4:
0 libsystem_kernel.dylib 0x3b043a84 mach_msg_trap + 20
1 CoreFoundation 0x30777560 __CFRunLoopServiceMachPort + 156
2 CoreFoundation 0x30775c80 __CFRunLoopRun + 792
3 CoreFoundation 0x306e0540 CFRunLoopRunSpecific + 524
4 CoreFoundation 0x306e0320 CFRunLoopRunInMode + 104
5 Foundation 0x3111b650 +[NSURLConnection(Loader) _resourceLoadLoop:] + 320
6 Foundation 0x31190dc0 __NSThread__main__ + 1056
7 libsystem_pthread.dylib 0x3b0bcc58 _pthread_body + 136
8 libsystem_pthread.dylib 0x3b0bcbc8 _pthread_start + 96
Thread 5:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 6:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 7:
0 libsystem_kernel.dylib 0x3b056550 __semwait_signal + 24
1 Foundation 0x311904d8 +[NSThread sleepForTimeInterval:] + 144
2 [THE APP] 0x0014a870 -[KSCrashDeadlockMonitor runMonitor] + 232
3 Foundation 0x31190dc0 __NSThread__main__ + 1056
4 libsystem_pthread.dylib 0x3b0bcc58 _pthread_body + 136
5 libsystem_pthread.dylib 0x3b0bcbc8 _pthread_start + 96
Thread 8:
0 libsystem_kernel.dylib 0x3b043a84 mach_msg_trap + 20
1 [THE APP] 0x001469e0 ksmachexc_i_handleExceptions + 128
2 libsystem_pthread.dylib 0x3b0bcc58 _pthread_body + 136
3 libsystem_pthread.dylib 0x3b0bcbc8 _pthread_start + 96
Thread 9:
Thread 10:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 11:
0 libsystem_kernel.dylib 0x3b056440 select$DARWIN_EXTSN + 20
1 libsystem_pthread.dylib 0x3b0bcc58 _pthread_body + 136
2 libsystem_pthread.dylib 0x3b0bcbc8 _pthread_start + 96
Thread 12:
0 libsystem_kernel.dylib 0x3b056c7c __workq_kernreturn + 8
Thread 13 Crashed:
0 libobjc.A.dylib 0x3aaa1b66 objc_msgSend + 6
1 UIKit 0x32fe4b80 -[UINavigationItem updateNavigationBarButtonsAnimated:] + 156
2 UIKit 0x32fe46e8 -[UINavigationItem setRightBarButtonItem:animated:] + 156
3 [THE APP] 0x000c6058 -[ProductViewController loadXML] (ProductViewController.m:978)
4 Foundation 0x31190dc0 __NSThread__main__ + 1056
5 libsystem_pthread.dylib 0x3b0bcc58 _pthread_body + 136
6 libsystem_pthread.dylib 0x3b0bcbc8 _pthread_start + 96
Thread 13 crashed with ARM Thread State:
r0: 0x15e78c40 r1: 0x33517435 r2: 0x00000000 r3: 0x00000000
r4: 0x33517435 r5: 0x33530ea0 r6: 0x15e83b00 r7: 0x037a2be0
r8: 0x15d56570 r9: 0x70000000 r10: 0x00000000 r11: 0x00000001
ip: 0x3b5be224 sp: 0x037a27f0 lr: 0x32fccffb pc: 0x3aaa1b66
cpsr: 0x20000030
Binary Images:
[cut cause of char limit]
Any ideas? Thanks for the help!
First of all you shouldn't run this in a background thread.
Secondly BAD_ACCESS usually happens when you over-release something.
I can't figure out where you over-release but maybe you can find it in your code. my guess is the navigation item tries to release something before setting your externButton...
EDIT: where is this code happening at? could be that the UIViewController isn't pushed anymore into the navigation controller or not the top one by the time this code is executed?
Things that update the UI should be on the main thread.
dispatch_async(dispatch_get_main_queue(), ^{ /* UI code goes here */ });

Help to solve Apple's crash-reports logs

my app was rejected for a crash that i didn't notice on the simulator.
Here are the logs, (already imported on XCode > Organizer ) can someone help me with this?
Incident Identifier: 88AD655D-3540-419C-A883-EFCEEB8CFE16
CrashReporter Key: 6b6d313765323bdd8ad35c9b99c487d423fd70ab
Hardware Model: iPad2,2
Process: MyApp [7983]
Path: /var/mobile/Applications/F9B518BA-1F72-449C-B584-45E77ECB9CB8/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-09-21 17:14:13.004 -0700
OS Version: iPhone OS 4.3.5 (8L1)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x361eda1c 0x361dc000 + 72220
1 libsystem_c.dylib 0x322df3b4 0x322ac000 + 209844
2 libsystem_c.dylib 0x322d7bf8 0x322ac000 + 179192
3 libstdc++.6.dylib 0x32729a64 0x326e5000 + 281188
4 libobjc.A.dylib 0x336b606c 0x336b0000 + 24684
5 libstdc++.6.dylib 0x32727e36 0x326e5000 + 273974
6 libstdc++.6.dylib 0x32727e8a 0x326e5000 + 274058
7 libstdc++.6.dylib 0x32727f5a 0x326e5000 + 274266
8 libobjc.A.dylib 0x336b4c84 0x336b0000 + 19588
9 CoreFoundation 0x35b4848a +[NSException raise:format:arguments:] + 62
10 CoreFoundation 0x35b484c4 +[NSException raise:format:] + 28
11 UIKit 0x32a51a4c -[UINib instantiateWithOwner:options:] + 1104
12 UIKit 0x32a52e02 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 86
13 UIKit 0x329cc5e2 -[UIViewController _loadViewFromNibNamed:bundle:] + 30
14 UIKit 0x32999f9e -[UIViewController loadView] + 74
15 UIKit 0x328e1b1e -[UITableViewController loadView] + 46
16 UIKit 0x3287eeb8 -[UIViewController view] + 24
17 UIKit 0x3288d5e8 -[UIViewController contentScrollView] + 16
18 UIKit 0x3288d458 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
19 UIKit 0x3288d356 -[UINavigationController _layoutViewController:] + 18
20 UIKit 0x3288ce2e -[UINavigationController _startTransition:fromViewController:toViewController:] + 374
21 UIKit 0x3288cc3c -[UINavigationController _startDeferredTransitionIfNeeded] + 176
22 UIKit 0x3288cb80 -[UINavigationController viewWillLayoutSubviews] + 8
23 UIKit 0x3288cb1c -[UILayoutContainerView layoutSubviews] + 132
24 UIKit 0x3284d5f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 20
25 CoreFoundation 0x35ab5efc -[NSObject(NSObject) performSelector:withObject:] + 16
26 QuartzCore 0x309ffbae -[CALayer layoutSublayers] + 114
27 QuartzCore 0x309ff966 CALayerLayoutIfNeeded + 178
28 QuartzCore 0x30a051be CA::Context::commit_transaction(CA::Transaction*) + 206
29 QuartzCore 0x30a04fd0 CA::Transaction::commit() + 184
30 QuartzCore 0x309fe04e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
31 CoreFoundation 0x35b1fa2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 10
32 CoreFoundation 0x35b2145e __CFRunLoopDoObservers + 406
33 CoreFoundation 0x35b22754 __CFRunLoopRun + 848
34 CoreFoundation 0x35ab2ebc CFRunLoopRunSpecific + 224
35 CoreFoundation 0x35ab2dc4 CFRunLoopRunInMode + 52
36 GraphicsServices 0x308a7418 GSEventRunModal + 108
37 GraphicsServices 0x308a74c4 GSEventRun + 56
38 UIKit 0x32876d62 -[UIApplication _run] + 398
39 UIKit 0x32874800 UIApplicationMain + 664
40 MyApp 0x00002622 0x1000 + 5666
41 MyApp 0x000025ec 0x1000 + 5612
Thread 1:
0 libsystem_kernel.dylib 0x361ee3ec 0x361dc000 + 74732
1 libsystem_c.dylib 0x322e06d8 0x322ac000 + 214744
2 libsystem_c.dylib 0x322e0bbc 0x322ac000 + 215996
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x361eefbc 0x361dc000 + 77756
1 libdispatch.dylib 0x31d33ed4 _dispatch_mgr_invoke + 744
2 libdispatch.dylib 0x31d34f3a _dispatch_queue_invoke + 70
3 libdispatch.dylib 0x31d344ec _dispatch_worker_thread2 + 228
4 libsystem_c.dylib 0x322e058a 0x322ac000 + 214410
5 libsystem_c.dylib 0x322e0bbc 0x322ac000 + 215996
Thread 3:
0 libsystem_kernel.dylib 0x361ee3ec 0x361dc000 + 74732
1 libsystem_c.dylib 0x322e06d8 0x322ac000 + 214744
2 libsystem_c.dylib 0x322e0bbc 0x322ac000 + 215996
Thread 4 name: WebThread
Thread 4:
0 libsystem_kernel.dylib 0x361ebc00 0x361dc000 + 64512
1 libsystem_kernel.dylib 0x361eb758 0x361dc000 + 63320
2 CoreFoundation 0x35b202b8 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x35b22562 __CFRunLoopRun + 350
4 CoreFoundation 0x35ab2ebc CFRunLoopRunSpecific + 224
5 CoreFoundation 0x35ab2dc4 CFRunLoopRunInMode + 52
6 WebCore 0x35d8327e _ZL12RunWebThreadPv + 382
7 libsystem_c.dylib 0x322df30a 0x322ac000 + 209674
8 libsystem_c.dylib 0x322e0bb4 0x322ac000 + 215988
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x3f42b48c r5: 0x00000006 r6: 0x0054f56c r7: 0x2fdfd3e8
r8: 0x3f1b2964 r9: 0x00000065 r10: 0x00537f10 r11: 0x368d9d97
ip: 0x00000148 sp: 0x2fdfd3dc lr: 0x322df3bb pc: 0x361eda1c
cpsr: 0x000f0010
Apple said
We found that your app crashed on iPad 2 running iOS 4.3.5, which is
not in compliance with the App Store Review Guidelines.
Specifically, we noticed that your app crashes when selecting the
"Favorites" tab.
But to me, Favorites Tab works fine (even if i don't have an iPad, i work through the simulator)
Thanks
This appears to be the same problem with the SDK bug in 4.3.5 related to the method loadNibNamed.
See the accepted answer to this question for temporary resolution until Apple release a fix: UIImageView initWithCoder - unrecognized selector sent to instance... iOS 5 beta SDK
The question relates to iOS 5 beta. However, I believe it is the same ongoing problem.

Resources