I am trying to replicate a bug in my app which is happening for users occasionally. I have the below crash report. Am I right in thinking the app is crashing due to an NSDictionary not having a value for a specific key ? And is there anything else I can deduce from the report ?
Date/Time: 2013-09-19 12:12:54.627 +0800
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x31bbd3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x39a5795e objc_exception_throw + 26
2 CoreFoundation 0x31b0e876 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 130
3 CoreFoundation 0x31b0e732 +[NSDictionary dictionaryWithObject:forKey:] + 46
4 MyApp 0x00103f34 -[WebViewJavascriptBridge _sendData:responseCallback:handlerName:] (WebViewJavascriptBridge.m:95)
5 MyApp 0x00103d2a -[WebViewJavascriptBridge callHandler:data:responseCallback:] (WebViewJavascriptBridge.m:67)
6 MyApp 0x00103cec -[WebViewJavascriptBridge callHandler:data:] (WebViewJavascriptBridge.m:63)
7 MyApp 0x000c3be2 -[ContractViewController updateHTML] (ContractViewController.m:293)
8 MyApp 0x000c2fec -[ContractViewController startEditableContract] (ContractViewController.m:199)
9 MyApp 0x000c2bc2 -[ContractViewController viewDidLoad] (ContractViewController.m:192)
10 UIKit 0x339eb574 -[UIViewController loadViewIfRequired] + 360
11 UIKit 0x33a401f2 -[UIViewController contentScrollView] + 22
12 UIKit 0x33a40138 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
13 UIKit 0x33a4001c -[UINavigationController _layoutViewController:] + 28
14 UIKit 0x33a3ff48 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 268
15 UIKit 0x33a3f694 -[UINavigationController _startTransition:fromViewController:toViewController:] + 60
16 UIKit 0x33a3f57c -[UINavigationController _startDeferredTransitionIfNeeded:] + 320
17 UIKit 0x33a2db56 -[UINavigationController pushViewController:transition:forceImmediate:] + 854
18 UIKit 0x33a2d7f6 -[UINavigationController pushViewController:animated:] + 34
19 MyApp 0x000b91dc -[ExhibitorDetailsViewController contractLoadButton:] (ExhibitorDetailsViewController.m:680)
20 UIKit 0x33ab7082 -[UIApplication sendAction:to:from:forEvent:] + 66
21 UIKit 0x33ab7036 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
22 UIKit 0x33ab7010 -[UIControl sendAction:to:forEvent:] + 40
23 UIKit 0x33ab68c6 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
24 UIKit 0x33ab6db4 -[UIControl touchesEnded:withEvent:] + 484
25 UIKit 0x339df5f4 -[UIWindow _sendTouchesForEvent:] + 520
26 UIKit 0x339cc8dc -[UIApplication sendEvent:] + 376
27 UIKit 0x339cc1ea _UIApplicationHandleEvent + 6194
28 GraphicsServices 0x356c05f2 _PurpleEventCallback + 586
29 GraphicsServices 0x356c0222 PurpleEventCallback + 30
30 CoreFoundation 0x31b923e2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
31 CoreFoundation 0x31b92386 __CFRunLoopDoSource1 + 134
32 CoreFoundation 0x31b9120a __CFRunLoopRun + 1378
33 CoreFoundation 0x31b04238 CFRunLoopRunSpecific + 352
34 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
35 GraphicsServices 0x356bf336 GSEventRunModal + 70
36 UIKit 0x33a202b4 UIApplicationMain + 1116
37 MyApp 0x00095e02 main (main.m:15)
38 libdyld.dylib 0x39e84b1c start + 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x39f4a838 __kill + 8
1 MyApp 0x00107ed0 TFHandleExceptions + 988
2 CoreFoundation 0x31bbd6cc __handleUncaughtException + 624
3 libobjc.A.dylib 0x39a57a46 _objc_terminate() + 126
4 libc++abi.dylib 0x394a4118 safe_handler_caller(void (*)()) + 76
5 libc++abi.dylib 0x394a41b0 std::terminate() + 16
6 libc++abi.dylib 0x394a5626 __cxa_rethrow + 90
7 libobjc.A.dylib 0x39a579b0 objc_exception_rethrow + 8
8 CoreFoundation 0x31b0429c CFRunLoopRunSpecific + 452
9 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
10 GraphicsServices 0x356bf336 GSEventRunModal + 70
11 UIKit 0x33a202b4 UIApplicationMain + 1116
12 MyApp 0x00095e02 main (main.m:15)
13 libdyld.dylib 0x39e84b1c start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x39f3b5d0 kevent64 + 24
1 libdispatch.dylib 0x39e76d22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x39e72374 _dispatch_mgr_thread + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x39f4b0fc __psynch_mutexwait + 24
1 libsystem_c.dylib 0x39e93e66 pthread_mutex_lock + 390
2 WebCore 0x37aea2b8 _WebTryThreadLock(bool) + 184
3 WebCore 0x37aea1e8 WebRunLoopLock(__CFRunLoopObserver*, unsigned long, void*) + 40
4 CoreFoundation 0x31b9293e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
5 CoreFoundation 0x31b90c34 __CFRunLoopDoObservers + 272
6 CoreFoundation 0x31b91076 __CFRunLoopRun + 974
7 CoreFoundation 0x31b04238 CFRunLoopRunSpecific + 352
8 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
9 WebCore 0x37ae8390 RunWebThread(void*) + 440
10 libsystem_c.dylib 0x39ea40de _pthread_start + 306
11 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x39f3ae30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39f3afd0 mach_msg + 48
2 CoreFoundation 0x31b922b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x31b9102c __CFRunLoopRun + 900
4 CoreFoundation 0x31b04238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
6 Foundation 0x32451888 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x324d522c __NSThread__main__ + 968
8 libsystem_c.dylib 0x39ea40de _pthread_start + 306
9 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x39f3ae30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39f3afd0 mach_msg + 48
2 CoreFoundation 0x31b922b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x31b9102c __CFRunLoopRun + 900
4 CoreFoundation 0x31b04238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
6 Foundation 0x324285be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x324cbc40 -[NSRunLoop(NSRunLoop) run] + 76
8 MyApp 0x0011cf4c -[TFNetworkManager networkRunLoopThreadEntry] + 120
9 Foundation 0x324d522c __NSThread__main__ + 968
10 libsystem_c.dylib 0x39ea40de _pthread_start + 306
11 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x39f4b594 __select + 20
1 CoreFoundation 0x31b96474 __CFSocketManager + 676
2 libsystem_c.dylib 0x39ea40de _pthread_start + 306
3 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 6 name: JavaScriptCore::BlockFree
Thread 6:
0 libsystem_kernel.dylib 0x39f4b08c __psynch_cvwait + 24
1 libsystem_c.dylib 0x39e9cafc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x39e9c870 pthread_cond_timedwait + 40
3 JavaScriptCore 0x35ab5df6 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 102
4 JavaScriptCore 0x35bc8532 JSC::BlockAllocator::blockFreeingThreadMain() + 78
5 JavaScriptCore 0x35bdb030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x39ea40de _pthread_start + 306
7 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 7 name: JavaScriptCore::Marking
Thread 7:
0 libsystem_kernel.dylib 0x39f4b08c __psynch_cvwait + 24
1 libsystem_c.dylib 0x39e9cafc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x39ea6cf8 pthread_cond_wait + 36
3 JavaScriptCore 0x35b5b6dc JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode) + 140
4 JavaScriptCore 0x35b5b620 JSC::MarkStackThreadSharedData::markingThreadMain() + 140
5 JavaScriptCore 0x35bdb030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x39ea40de _pthread_start + 306
7 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 8:
0 libsystem_kernel.dylib 0x39f3ae30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39f3afd0 mach_msg + 48
2 CoreFoundation 0x31b922b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x31b9102c __CFRunLoopRun + 900
4 CoreFoundation 0x31b04238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x31b040c4 CFRunLoopRunInMode + 100
6 Foundation 0x324285be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x324cbc40 -[NSRunLoop(NSRunLoop) run] + 76
8 MyApp 0x0012e308 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] + 120
9 Foundation 0x324d522c __NSThread__main__ + 968
10 libsystem_c.dylib 0x39ea40de _pthread_start + 306
11 libsystem_c.dylib 0x39ea3fa4 thread_start + 4
Thread 9:
0 libsystem_kernel.dylib 0x39f4bd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39e99ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39e997f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39e99680 start_wqthread + 4
Thread 10:
0 libsystem_kernel.dylib 0x39f4bd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39e99ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39e997f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39e99680 start_wqthread + 4
Thread 11:
0 libsystem_kernel.dylib 0x39f4bd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39e99ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39e997f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39e99680 start_wqthread + 4
Thread 12:
0 libsystem_kernel.dylib 0x39f4bd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39e99ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39e997f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39e99680 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x3ba42fc8
r4: 0xffffffff r5: 0x2fd6c311 r6: 0x2fd6c310 r7: 0x2fd6c9e0
r8: 0x2fd6c340 r9: 0x3ba38898 r10: 0x2fd6c318 r11: 0x00000015
ip: 0x00000025 sp: 0x2fd6c2fc lr: 0x00107ed5 pc: 0x39f4a838
cpsr: 0x00080010
Code which is crashing :
- (void)_sendData:(NSDictionary *)data responseCallback:(WVJBResponseCallback)responseCallback handlerName:(NSString*)handlerName {
NSMutableDictionary* message = [NSMutableDictionary dictionaryWithObject:data forKey:#"data"];
if (responseCallback) {
NSString* callbackId = [NSString stringWithFormat:#"objc_cb_%ld", ++_uniqueId];
_responseCallbacks[callbackId] = [responseCallback copy];
message[#"callbackId"] = callbackId;
}
if (handlerName) {
message[#"handlerName"] = handlerName;
}
[self _queueMessage:message];
}
The crash happens in the file WebViewJavascriptBridge.m in line 95 in the method [WebViewJavascriptBridge _sendData:responseCallback:handlerName:].
That line causes an exception in [__NSPlaceholderDictionary initWithObjects:forKeys:count:]. Since the exception message isn't shown in the crash report, and you don't provide any source code of that place we can only assume what is happening.
One assumption would be, your are creating a dictionary with nil values or keys. But without code or you actually debugging this, this is only an assumption.
Related
One of my customers reports consistent crashing, about 75% of the times he performs a particular operation in the app. That operation involves some image processing. He's using an iPhone 4S (the same model I used when developing the app) and iOS 7.1.1. No other customer has reported this issue. He has deleted the app and reinstalled from the App Store. He's using the app's default settings. I cannot recreate the issue.
Thread 8 crashes, but does not show any lines in my code ("gCard"). The issue appears to be "doesNotRecognizeSelector:" in a thread that does not show any lines in my code. I don't understand this. (The app uses brad Larson's GPUImage but I don't know if that's a factor.)
I need help to understand the dump and suggestions on my next step.
{"name":"gCard","bug_type":"109","os_version":"iPhone OS 7.1.1 (11D201)","bundleID":"com.PFM3.Ghost-Card","version":"1.2.1 (1.2.1)","app_name":"gCard"}
Incident Identifier: E85F86F8-0F39-4E55-9EAD-48461F1EF955
CrashReporter Key: 64c031d9f1572910e1137bebea2b9be924396928
Hardware Model: iPhone4,1
Process: gCard [136]
Path: /var/mobile/Applications/4E5D5D22-0202-47DE-B8B2-B9C9D90825B2/gCard.app/gCard
Identifier: com.PFM3.Ghost-Card
Version: 1.2.1 (1.2.1)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-06-23 00:03:18.728 -0700
OS Version: iOS 7.1.1 (11D201)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Triggered by Thread: 8
Last Exception Backtrace:
0 CoreFoundation 0x2ec27fce __exceptionPreprocess + 126
1 libobjc.A.dylib 0x394a0cca objc_exception_throw + 34
2 CoreFoundation 0x2ec2b962 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
3 CoreFoundation 0x2ec2a24e ___forwarding___ + 702
4 CoreFoundation 0x2eb797b4 _CF_forwarding_prep_0 + 20
5 UIFoundation 0x36865a20 __NSStringDrawingEngine + 12200
6 UIFoundation 0x368629a2 -[NSString(NSExtendedStringDrawing) drawWithRect:options:attributes:context:] + 146
7 UIKit 0x3145cd1c -[UILabel _drawTextInRect:baselineCalculationOnly:] + 4220
8 UIKit 0x314c3004 -[UILabel drawTextInRect:] + 496
9 UIKit 0x314c2e06 -[UILabel drawRect:] + 74
10 UIKit 0x314c2da0 -[UIView(CALayerDelegate) drawLayer:inContext:] + 368
11 QuartzCore 0x310f02bc -[CALayer drawInContext:] + 96
12 QuartzCore 0x310d9e3a CABackingStoreUpdate_ + 1850
13 QuartzCore 0x311b4d68 ___ZN2CA5Layer8display_Ev_block_invoke + 48
14 QuartzCore 0x310d96ee x_blame_allocations + 78
15 QuartzCore 0x310d9396 CA::Layer::display_() + 1102
16 QuartzCore 0x310bd038 CA::Layer::display_if_needed(CA::Transaction*) + 204
17 QuartzCore 0x310bccd0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 20
18 QuartzCore 0x310bc6da CA::Context::commit_transaction(CA::Transaction*) + 226
19 QuartzCore 0x310bc4ea CA::Transaction::commit() + 310
20 QuartzCore 0x310e9a7e CA::Transaction::release_thread(void*) + 158
21 libsystem_pthread.dylib 0x39acb688 _pthread_tsd_cleanup + 160
22 libsystem_pthread.dylib 0x39acb406 _pthread_exit + 82
23 libsystem_pthread.dylib 0x39acabe2 _pthread_wqthread + 314
24 libsystem_pthread.dylib 0x39acaa94 start_wqthread + 4
Thread 0:
0 libsystem_kernel.dylib 0x39a50a58 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39a50854 mach_msg + 44
2 CoreFoundation 0x2ebf2896 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2ebf1002 __CFRunLoopRun + 850
4 CoreFoundation 0x2eb5bf0a CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2eb5bcee CFRunLoopRunInMode + 102
6 GraphicsServices 0x33ab465e GSEventRunModal + 134
7 UIKit 0x314a7168 UIApplicationMain + 1132
8 gCard 0x00089e12 main (main.m:16)
9 libdyld.dylib 0x399adab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x39a50808 kevent64 + 24
1 libdispatch.dylib 0x39992078 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x39991dfe _dispatch_mgr_thread$VARIANT$mp + 34
Thread 2:
0 libsystem_kernel.dylib 0x39a50a58 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39a50854 mach_msg + 44
2 CoreFoundation 0x2ebf2896 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2ebf0fbc __CFRunLoopRun + 780
4 CoreFoundation 0x2eb5bf0a CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2eb5bcee CFRunLoopRunInMode + 102
6 Foundation 0x2f54e1e6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x2f59f09c -[NSRunLoop(NSRunLoop) run] + 76
8 gCard 0x000cd8d4 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:151)
9 Foundation 0x2f610a5a __NSThread__main__ + 1058
10 libsystem_pthread.dylib 0x39acc916 _pthread_body + 138
11 libsystem_pthread.dylib 0x39acc886 _pthread_start + 98
12 libsystem_pthread.dylib 0x39acaaa0 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x39a50a58 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39a50854 mach_msg + 44
2 CoreFoundation 0x2ebf2896 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2ebf0fbc __CFRunLoopRun + 780
4 CoreFoundation 0x2eb5bf0a CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2eb9f9fe CFRunLoopRun + 94
6 CoreMotion 0x2f2193a8 ___lldb_unnamed_function1423$$CoreMotion + 724
7 libsystem_pthread.dylib 0x39acc916 _pthread_body + 138
8 libsystem_pthread.dylib 0x39acc886 _pthread_start + 98
9 libsystem_pthread.dylib 0x39acaaa0 thread_start + 4
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x39a50a58 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39a50854 mach_msg + 44
2 CoreFoundation 0x2ebf2896 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2ebf0fbc __CFRunLoopRun + 780
4 CoreFoundation 0x2eb5bf0a CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2eb5bcee CFRunLoopRunInMode + 102
6 Foundation 0x2f59b082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7 Foundation 0x2f610a5a __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x39acc916 _pthread_body + 138
9 libsystem_pthread.dylib 0x39acc886 _pthread_start + 98
10 libsystem_pthread.dylib 0x39acaaa0 thread_start + 4
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x39a63434 __select + 20
1 CoreFoundation 0x2ebf6758 __CFSocketManager + 480
2 libsystem_pthread.dylib 0x39acc916 _pthread_body + 138
3 libsystem_pthread.dylib 0x39acc886 _pthread_start + 98
4 libsystem_pthread.dylib 0x39acaaa0 thread_start + 4
Thread 6:
0 libsystem_kernel.dylib 0x39a63c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39acabda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39acaa94 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x39a63c70 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x39acabda _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x39acaa94 start_wqthread + 4
Thread 8 Crashed:
0 libsystem_c.dylib 0x39a1404e __abort + 102
1 libsystem_c.dylib 0x39a13fe4 abort + 84
2 libc++abi.dylib 0x38d42cd2 abort_message + 70
3 libc++abi.dylib 0x38d5b6e0 default_terminate_handler() + 248
4 libobjc.A.dylib 0x394a0f62 _objc_terminate() + 190
5 libc++abi.dylib 0x38d591c4 std::__terminate(void (*)()) + 76
6 libc++abi.dylib 0x38d58a18 __cxa_throw + 112
7 libobjc.A.dylib 0x394a0d9e objc_exception_throw + 246
8 CoreFoundation 0x2ec2b962 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
9 CoreFoundation 0x2ec2a24e ___forwarding___ + 702
10 CoreFoundation 0x2eb797b4 _CF_forwarding_prep_0 + 20
11 UIFoundation 0x36865a20 __NSStringDrawingEngine + 12200
12 UIFoundation 0x368629a2 -[NSString(NSExtendedStringDrawing) drawWithRect:options:attributes:context:] + 146
13 UIKit 0x3145cd1c -[UILabel _drawTextInRect:baselineCalculationOnly:] + 4220
14 UIKit 0x314c3004 -[UILabel drawTextInRect:] + 496
15 UIKit 0x314c2e06 -[UILabel drawRect:] + 74
16 UIKit 0x314c2da0 -[UIView(CALayerDelegate) drawLayer:inContext:] + 368
17 QuartzCore 0x310f02bc -[CALayer drawInContext:] + 96
18 QuartzCore 0x310d9e3c CABackingStoreUpdate_ + 1852
19 QuartzCore 0x311b4d68 ___ZN2CA5Layer8display_Ev_block_invoke + 48
20 QuartzCore 0x310d96f0 x_blame_allocations + 80
21 QuartzCore 0x310d9396 CA::Layer::display_() + 1102
22 QuartzCore 0x310bd038 CA::Layer::display_if_needed(CA::Transaction*) + 204
23 QuartzCore 0x310bccd0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 20
24 QuartzCore 0x310bc6da CA::Context::commit_transaction(CA::Transaction*) + 226
25 QuartzCore 0x310bc4ea CA::Transaction::commit() + 310
26 QuartzCore 0x310e9a7e CA::Transaction::release_thread(void*) + 158
27 libsystem_pthread.dylib 0x39acb68a _pthread_tsd_cleanup + 162
28 libsystem_pthread.dylib 0x39acb406 _pthread_exit + 82
29 libsystem_pthread.dylib 0x39acabe2 _pthread_wqthread + 314
30 libsystem_pthread.dylib 0x39acaa94 start_wqthread + 4
Thread 8 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00000001
r4: 0x06277c84 r5: 0xffffffff r6: 0x00000000 r7: 0x06277c94
r8: 0x1767ed40 r9: 0x39ac7f69 r10: 0x368b94c8 r11: 0x00000000
ip: 0x00000030 sp: 0x06277c7c lr: 0x39a1404f pc: 0x39a1404e
cpsr: 0x40000030
You should/must do all( or nearly all) ui specific operations on the main thread. Possibly you alter the view hierarchy in a block performed on another block.
I am getting weird crash in my application running in iOS 7 but in iOS 6 app is working fine. I am performing some operations. After 5-6 operations are completed I am experiencing this crash. This number can go till 20 also or 1 also. Attaching crash log with this.
Incident Identifier: 6702CA20-9832-4305-B723-588C6B33C199
CrashReporter Key: 0370a1a51d424d34102c66389c6b00b12585aa57
Hardware Model: iPad2,5
Process: mobile [2958]
Path:
Identifier:
Version: 2.0.0.401
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-06-02 13:35:50.243 +0530
OS Version: iOS 7.0.6 (11B651)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0xef264ee9
Triggered by Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x3af9eb22 objc_msgSend + 2
1 UIFoundation 0x38384d5e -[NSParagraphStyle _deallocExtraData] + 54
2 UIFoundation 0x383858ca -[NSParagraphStyle dealloc] + 22
3 CoreFoundation 0x3073d650 CFRelease + 552
4 CoreFoundation 0x30749a1e -[__NSDictionaryM dealloc] + 130
5 libobjc.A.dylib 0x3afaeb06 objc_object::sidetable_release(bool) + 170
6 UIKit 0x3304be68 -[UILabel dealloc] + 116
7 UIKit 0x32f80402 -[UIView dealloc] + 362
8 UIKit 0x3305223a -[UIScrollView dealloc] + 830
9 UIKit 0x33051cb4 -[UIScrollView removeFromSuperview] + 60
10 UIKit 0x32f80402 -[UIView dealloc] + 362
11 UIKit 0x33199088 -[_UIModalItemContentView dealloc] + 116
12 UIKit 0x3323d432 -[_UIModalItemAlertContentView dealloc] + 70
13 libobjc.A.dylib 0x3afa0002 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
14 CoreFoundation 0x3074097c _CFAutoreleasePoolPop + 12
15 CoreFoundation 0x307d80dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
16 CoreFoundation 0x307d7cf2 __CFRunLoopDoTimer + 778
17 CoreFoundation 0x307d608e __CFRunLoopRun + 1206
18 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
19 CoreFoundation 0x30740a06 CFRunLoopRunInMode + 102
20 GraphicsServices 0x3543427e GSEventRunModal + 134
21 UIKit 0x32fe4044 UIApplicationMain + 1132
22 mobile 0x0005d2c2 main (main.m:15)
23 libdyld.dylib 0x3b4abab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3b54f83c kevent64 + 24
1 libdispatch.dylib 0x3b490210 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3b48ff96 _dispatch_mgr_thread$VARIANT$mp + 34
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x3b54fa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b54f888 mach_msg + 44
2 CoreFoundation 0x307d77be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x307d5ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x30740a06 CFRunLoopRunInMode + 102
6 WebCore 0x3894e266 RunWebThread(void*) + 414
7 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
8 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
9 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x3b54fa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b54f888 mach_msg + 44
2 CoreFoundation 0x307d77be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x307d5ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x30740a06 CFRunLoopRunInMode + 102
6 libAVFAudio.dylib 0x2f7c3584 GenericRunLoopThread::Entry(void*) + 124
7 libAVFAudio.dylib 0x2f7b799c CAPThread::Entry(CAPThread*) + 176
8 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
9 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
10 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x3b562440 __select + 20
1 CoreFoundation 0x307db680 __CFSocketManager + 480
2 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
3 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
4 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 5 name: GCDAsyncSocket-CFStream
Thread 5:
0 libsystem_kernel.dylib 0x3b54fa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b54f888 mach_msg + 44
2 CoreFoundation 0x307d77be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x307d5ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x30740a06 CFRunLoopRunInMode + 102
6 Foundation 0x3112e3d6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x3117f30c -[NSRunLoop(NSRunLoop) run] + 76
8 mobile 0x000f6228 +[GCDAsyncSocket cfstreamThread] (GCDAsyncSocket.m:6741)
9 Foundation 0x311f0c82 __NSThread__main__ + 1058
10 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
11 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
12 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x3b54fa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b54f888 mach_msg + 44
2 CoreFoundation 0x307d77be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x307d5ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x30740a06 CFRunLoopRunInMode + 102
6 Foundation 0x3117b2f2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7 Foundation 0x311f0c82 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
9 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
10 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 7:
0 libsystem_kernel.dylib 0x3b54fa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b54f888 mach_msg + 44
2 CoreFoundation 0x307d77be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x307d5ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x30740c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x30784736 CFRunLoopRun + 94
6 CoreMotion 0x30df7230 ___lldb_unnamed_function1404$$CoreMotion + 724
7 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
8 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
9 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 8:
0 libsystem_kernel.dylib 0x3b562c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b5c8dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b5c8c80 start_wqthread + 4
Thread 9:
0 libsystem_kernel.dylib 0x3b562c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b5c8dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b5c8c80 start_wqthread + 4
Thread 10:
0 libsystem_kernel.dylib 0x3b562c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b5c8dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b5c8c80 start_wqthread + 4
Thread 11:
0 libsystem_kernel.dylib 0x3b562440 __select + 20
1 ExternalAccessory 0x31119352 -[EAInputStream _readInputFromAccThread] + 342
2 Foundation 0x311f0c82 __NSThread__main__ + 1058
3 libsystem_pthread.dylib 0x3b5cac1a _pthread_body + 138
4 libsystem_pthread.dylib 0x3b5cab8a _pthread_start + 98
5 libsystem_pthread.dylib 0x3b5c8c8c thread_start + 4
Thread 12:
0 libsystem_kernel.dylib 0x3b562c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3b5c8dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3b5c8c80 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0xef264ee9 r1: 0x33566b29 r2: 0x3cf673f0 r3: 0x00000001
r4: 0x160815a0 r5: 0x33566b29 r6: 0x0000002c r7: 0x27dc88ac
r8: 0x160815a4 r9: 0x158af438 r10: 0x14e8846c r11: 0x14e88430
ip: 0x3cf59864 sp: 0x27dc88a0 lr: 0x38384d63 pc: 0x3af9eb22
cpsr: 0x20000030
Your app crashes while a UILabel inside a UIScrollView inside an alert is deallocated. I'd suspect that either your app overwrites memory somewhere and this is just a symptom, or you are using some alert in a non-standard way, possibly changing a paragraph style somewhere in the alert in a way that's wrong.
First step would be to turn all reasonable warnings on in the compiler, use the static analyser to find problems, and fix all of them.
My app is crashing when Game Center is logged in, all is fine through the simulator and in sandbox mode on all devices. I have had some negative feedback regarding the crashes so have started to look through it. I thought it was solved so got the update out, but I was wrong.
I have this crash report from my phone but am some what baffled.
Version: 1.4 (1.4)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-02-22 09:18:36.959 +0000
OS Version: iOS 7.0.4 (11B554a)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x311eff46 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3b57f6aa objc_exception_throw + 34
2 CoreFoundation 0x311f38e2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
3 CoreFoundation 0x311f21c6 ___forwarding___ + 702
4 CoreFoundation 0x311414d4 __forwarding_prep_0___ + 20
5 CommanderCool 0x000a13a2 0x67000 + 238498
6 CommanderCool 0x00098a30 0x67000 + 203312
7 CommanderCool 0x00098688 0x67000 + 202376
8 CommanderCool 0x000886a6 0x67000 + 136870
9 CommanderCool 0x0008a21a 0x67000 + 143898
10 CommanderCool 0x0009f50a 0x67000 + 230666
11 CommanderCool 0x00082316 0x67000 + 111382
12 CommanderCool 0x0007fa6e 0x67000 + 100974
13 CommanderCool 0x0008198c 0x67000 + 108940
14 CommanderCool 0x00087160 0x67000 + 131424
15 CommanderCool 0x000ce93e 0x67000 + 424254
16 CommanderCool 0x000e000a 0x67000 + 495626
17 QuartzCore 0x336399ca CA::Display::DisplayLinkItem::dispatch() + 94
18 QuartzCore 0x33639774 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 340
19 IOMobileFramebuffer 0x3621e768 IOMobileFramebufferVsyncNotifyFunc + 100
20 IOKit 0x31ed1a70 IODispatchCalloutFromCFMessage + 244
21 CoreFoundation 0x311afe1c __CFMachPortPerform + 132
22 CoreFoundation 0x311ba9da __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
23 CoreFoundation 0x311ba976 __CFRunLoopDoSource1 + 342
24 CoreFoundation 0x311b914a __CFRunLoopRun + 1394
25 CoreFoundation 0x31123c22 CFRunLoopRunSpecific + 518
26 CoreFoundation 0x31123a06 CFRunLoopRunInMode + 102
27 GraphicsServices 0x35e0227e GSEventRunModal + 134
28 UIKit 0x339c7044 UIApplicationMain + 1132
29 CommanderCool 0x0009d31e 0x67000 + 221982
30 CommanderCool 0x0006ef24 0x67000 + 32548
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3bb3e1fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3bba7a2e pthread_kill + 54
2 libsystem_c.dylib 0x3baeeff8 abort + 72
3 libc++abi.dylib 0x3ae1dcd2 abort_message + 70
4 libc++abi.dylib 0x3ae366e0 default_terminate_handler() + 248
5 libobjc.A.dylib 0x3b57f91e _objc_terminate() + 190
6 libc++abi.dylib 0x3ae341c4 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x3ae33d28 __cxa_rethrow + 96
8 libobjc.A.dylib 0x3b57f7f2 objc_exception_rethrow + 38
9 CoreFoundation 0x31123c98 CFRunLoopRunSpecific + 636
10 CoreFoundation 0x31123a06 CFRunLoopRunInMode + 102
11 GraphicsServices 0x35e0227e GSEventRunModal + 134
12 UIKit 0x339c7044 UIApplicationMain + 1132
13 CommanderCool 0x0009d31e 0x67000 + 221982
14 CommanderCool 0x0006ef24 0x67000 + 32548
Thread 1:
0 libsystem_kernel.dylib 0x3bb2b83c kevent64 + 24
1 libdispatch.dylib 0x3ba76e08 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3ba6639e _dispatch_mgr_thread$VARIANT$up + 34
Thread 2:
0 libsystem_kernel.dylib 0x3bb3ec7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3bba4dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3bba4c80 start_wqthread + 4
Thread 3:
0 libsystem_kernel.dylib 0x3bb3ec7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3bba4dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3bba4c80 start_wqthread + 4
Thread 4:
0 libsystem_kernel.dylib 0x3bb2ba8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3bb2b888 mach_msg + 44
2 CoreFoundation 0x311ba7be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x311b8ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x31123c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x31123a06 CFRunLoopRunInMode + 102
6 libAVFAudio.dylib 0x301a6584 GenericRunLoopThread::Entry(void*) + 124
7 libAVFAudio.dylib 0x3019a99c CAPThread::Entry(CAPThread*) + 176
8 libsystem_pthread.dylib 0x3bba6c1a _pthread_body + 138
9 libsystem_pthread.dylib 0x3bba6b8a _pthread_start + 98
10 libsystem_pthread.dylib 0x3bba4c8c thread_start + 4
Thread 5:
0 libsystem_kernel.dylib 0x3bb2ba8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3bb2b888 mach_msg + 44
2 AudioToolbox 0x30ba5116 AURemoteIO::IOThread::Run() + 102
3 AudioToolbox 0x30ba8348 AURemoteIO::IOThread::Entry(void*) + 4
4 AudioToolbox 0x30ae5ba8 CAPThread::Entry(CAPThread*) + 208
5 libsystem_pthread.dylib 0x3bba6c1a _pthread_body + 138
6 libsystem_pthread.dylib 0x3bba6b8a _pthread_start + 98
7 libsystem_pthread.dylib 0x3bba4c8c thread_start + 4
Thread 6:
0 libsystem_kernel.dylib 0x3bb2ba8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3bb2b888 mach_msg + 44
2 CoreFoundation 0x311ba7be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x311b8ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x31123c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x31123a06 CFRunLoopRunInMode + 102
6 AudioToolbox 0x30aff754 GenericRunLoopThread::Entry(void*) + 124
7 AudioToolbox 0x30ae5ba8 CAPThread::Entry(CAPThread*) + 208
8 libsystem_pthread.dylib 0x3bba6c1a _pthread_body + 138
9 libsystem_pthread.dylib 0x3bba6b8a _pthread_start + 98
10 libsystem_pthread.dylib 0x3bba4c8c thread_start + 4
Thread 7 name: com.apple.NSURLConnectionLoader
Thread 7:
0 libsystem_kernel.dylib 0x3bb2ba8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3bb2b888 mach_msg + 44
2 CoreFoundation 0x311ba7be __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x311b8ee4 __CFRunLoopRun + 780
4 CoreFoundation 0x31123c22 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x31123a06 CFRunLoopRunInMode + 102
6 Foundation 0x31b5e2f2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7 Foundation 0x31bd3c82 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x3bba6c1a _pthread_body + 138
9 libsystem_pthread.dylib 0x3bba6b8a _pthread_start + 98
10 libsystem_pthread.dylib 0x3bba4c8c thread_start + 4
Thread 8 name: com.apple.CFSocket.private
Thread 8:
0 libsystem_kernel.dylib 0x3bb3e440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x311be680 __CFSocketManager + 480
2 libsystem_pthread.dylib 0x3bba6c1a _pthread_body + 138
3 libsystem_pthread.dylib 0x3bba6b8a _pthread_start + 98
4 libsystem_pthread.dylib 0x3bba4c8c thread_start + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x00002060
r4: 0x00000006 r5: 0x3d77b18c r6: 0x00000000 r7: 0x27d9c594
r8: 0x1550f940 r9: 0x00000001 r10: 0x0022fc14 r11: 0x00000000
ip: 0x00000148 sp: 0x27d9c588 lr: 0x3bba7a33 pc: 0x3bb3e1fc
cpsr: 0x00000010
Binary Images:
Left out images as file was too big.
I'm using DDGameKitHelper and GKAchievementNotification to handle the game center notifications.
Can anyone help me understand a crash report? This is the first time I have ever had to deal with one since iOS App developing in 8 months.
I know it is something to do with dismissing a view controller that is causing it, but I have made no changes to the code regarding this but all of a sudden it is starting to cause problems. Any guidance on where to start would be amazing.
Date/Time: 2013-03-10 14:56:06.091 +0000
OS Version: iOS 6.1.2 (10B146)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3afee5b6 objc_msgSend + 22
1 AVFoundation 0x3247f752 -[AVAudioPlayer(AVAudioPlayerPriv) finishedPlaying:] + 74
2 Foundation 0x33c700f0 __NSThreadPerformPerform + 456
3 CoreFoundation 0x3332e680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
4 CoreFoundation 0x3332dee4 __CFRunLoopDoSources0 + 208
5 CoreFoundation 0x3332ccb2 __CFRunLoopRun + 642
6 CoreFoundation 0x3329feb8 CFRunLoopRunSpecific + 352
7 CoreFoundation 0x3329fd44 CFRunLoopRunInMode + 100
8 GraphicsServices 0x36e612e6 GSEventRunModal + 70
9 UIKit 0x351b52fc UIApplicationMain + 1116
10 iWhovian 0x000391fe main (main.m:15)
11 iWhovian 0x0002f56c start + 36
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3b4e1648 kevent64 + 24
1 libdispatch.dylib 0x3b41a4ec _dispatch_mgr_invoke + 792
2 libdispatch.dylib 0x3b40cdf4 _dispatch_mgr_thread$VARIANT$up + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x3b4e0eb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b4e1048 mach_msg + 36
2 CoreFoundation 0x3332e040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x3332cd9e __CFRunLoopRun + 878
4 CoreFoundation 0x3329feb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3329fd44 CFRunLoopRunInMode + 100
6 WebCore 0x39294500 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3b44a30e _pthread_start + 306
8 libsystem_c.dylib 0x3b44a1d4 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x3b4f108c __psynch_cvwait + 24
1 libsystem_c.dylib 0x3b442d2a _pthread_cond_wait + 642
2 libsystem_c.dylib 0x3b44cf14 pthread_cond_wait + 36
3 Foundation 0x33bec4d2 -[NSCondition wait] + 190
4 iWhovian 0x0006ef90 -[PFCommandCache runLoop] (PFCommandCache.m:491)
5 Foundation 0x33c6fe80 __NSThread__main__ + 968
6 libsystem_c.dylib 0x3b44a30e _pthread_start + 306
7 libsystem_c.dylib 0x3b44a1d4 thread_start + 4
Thread 4 name: AQClient
Thread 4:
0 libsystem_kernel.dylib 0x3b4e0eb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b4e1048 mach_msg + 36
2 CoreFoundation 0x3332e040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x3332cd9e __CFRunLoopRun + 878
4 CoreFoundation 0x3329feb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3329fd44 CFRunLoopRunInMode + 100
6 AudioToolbox 0x32d816fe GenericRunLoopThread::Entry(void*) + 134
7 AudioToolbox 0x32d62882 CAPThread::Entry(CAPThread*) + 294
8 libsystem_c.dylib 0x3b44a30e _pthread_start + 306
9 libsystem_c.dylib 0x3b44a1d4 thread_start + 4
Thread 5:
0 libsystem_kernel.dylib 0x3b4f1d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3b43fcf6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3b43fa12 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3b43f8a0 start_wqthread + 4
Thread 6 name: Dispatch queue: com.apple.NSXPCConnection.m-user.com.apple.gamed
Thread 6:
0 libobjc.A.dylib 0x3afee5b0 objc_msgSend + 16
1 CoreFoundation 0x332b0fdc -[__NSSetI member:] + 140
2 CoreFoundation 0x332b0f44 -[NSSet containsObject:] + 28
3 Foundation 0x33c08978 -[NSCoder _validateAllowedClass:forKey:allowingInvocations:] + 124
4 Foundation 0x33c08402 _decodeObjectStuff + 282
5 Foundation 0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76
6 GameKit 0x33e2f8fa -[GKInternalRepresentation initWithCoder:] + 238
7 Foundation 0x33c086f2 _decodeObjectStuff + 1034
8 Foundation 0x33d1fda8 -[NSXPCDecoder _decodeArrayOfObjectsForKey:] + 532
9 Foundation 0x33bf4ebc -[NSArray(NSArray) initWithCoder:] + 784
10 Foundation 0x33c086f2 _decodeObjectStuff + 1034
11 Foundation 0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76
12 GameKit 0x33e2f8fa -[GKInternalRepresentation initWithCoder:] + 238
13 Foundation 0x33c086f2 _decodeObjectStuff + 1034
14 Foundation 0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76
15 Foundation 0x33c09fe8 _walkAndDecodeData + 1708
16 Foundation 0x33c0988c decodeInvocationArguments + 1368
17 Foundation 0x33c08fc8 -[NSXPCDecoder decodeInvocation] + 860
18 Foundation 0x33c08630 _decodeObjectStuff + 840
19 Foundation 0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76
20 Foundation 0x33c07c04 -[NSXPCConnection _decodeAndInvokeReplyBlockWithData:] + 548
21 Foundation 0x33d1eedc __message_handler_block_invoke_0 + 32
22 libdispatch.dylib 0x3b40b11c _dispatch_call_block_and_release + 8
23 libdispatch.dylib 0x3b40a996 _dispatch_queue_drain$VARIANT$up + 142
24 libdispatch.dylib 0x3b40a890 _dispatch_queue_invoke$VARIANT$up + 32
25 libdispatch.dylib 0x3b419212 _dispatch_root_queue_drain + 190
26 libdispatch.dylib 0x3b4193b4 _dispatch_worker_thread2 + 80
27 libsystem_c.dylib 0x3b43fa0e _pthread_wqthread + 358
28 libsystem_c.dylib 0x3b43f8a0 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x3b4f1d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3b43fcf6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3b43fa12 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3b43f8a0 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x208a4ef0 r1: 0x38e042ae r2: 0x33f0ac6c r3: 0x00000008
r4: 0x20747372 r5: 0x2089ac70 r6: 0x33f0ac6c r7: 0x2fdd2df8
r8: 0x3b667530 r9: 0x0e3810ab r10: 0x00000000 r11: 0x1fd4dd90
ip: 0x3b5734ac sp: 0x2fdd2de0 lr: 0x3247f757 pc: 0x3afee5b6
cpsr: 0x20070030
I ran into this one a while ago. The problem can be fixed by setting the AVAudioPlayer instance's delegate to nil in your view controller's dealloc method. Unless you do this, the audio player tries to make one last call to its delegate to let it know that is is done playing. But if the delegate has been deallocated, you get this crash.
- (void)dealloc {
_myPlayer.delegate = nil; // _myPlayer is your AVAudioPlayer instance
[super dealloc]; // Only is you are not using ARC
}
You're most likely trying to access an object, that hast been deallocated. Have a look at
Debugging EXC_BAD_ACCESS Error in Xcode using Instruments (Archived)
to see how you can track it down.
I have an iPhone (iOS native) app that uses the current Facebook iOS SDK. When attempting to connect my app via the Single-Sign-On process, I frequently get a crash stating my app "has active assertions beyond permitted time". After reviewing other similar reports here on Stack Overflow (such as iPhone app "has active assertions beyond permitted time") I don't find anything that seems to fit my situation. I am following Facebook's recommended practices for integrating SSO (from https://developers.facebook.com/docs/mobile/ios/build/#implementsso). That means I am calling the Facebook SDK on my main thread. Facebook doesn't seem to think this will be a problem.
Can anyone explain what this particular error means? I assume that some iOS supervisor mechanism is killing my app because it's taking too long doing something, but what particular something? Is it because the foreground task is locked for too long? Or what?
Here's an iOS app crash report showing the error.
Incident Identifier: F2486727-9EAC-4D7F-8A45-07AC51ADD186
CrashReporter Key: b3825455d63e6e7f659074b5ea5fb89cf8ed1b9f
Hardware Model: iPhone2,1
Process: JouleBug [2060]
Path: /var/mobile/Applications/FA3DB4BA-92AF-4D14-AD3A-1553EFA1FA16/JouleBug.app/JouleBug
Identifier: JouleBug
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-07-05 14:44:30.751 -0400
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 3
Application Specific Information:
JouleBug[2060] has active assertions beyond permitted time:
{(
<SBProcessAssertion: 0xe2ed000> identifier: Suspending process: JouleBug[2060] permittedBackgroundDuration: 10.000000 reason: suspend owner pid:52 preventSuspend preventThrottleDownCPU preventThrottleDownUI
)}
Elapsed total CPU time (seconds): 6.190 (user 6.190, system 0.000), 84% CPU
Elapsed application CPU time (seconds): 1.515, 21% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x37e23dcc __open + 8
1 Foundation 0x31ab412a _NSmkstemp83 + 322
2 Foundation 0x31ab3f4a _NSCreateTemporaryFile + 118
3 Foundation 0x31ab3b36 _NSWriteBytesToFileWithExtendedAttributes + 186
4 Foundation 0x31ab3a70 _NSWriteBytesToFile + 24
5 Foundation 0x31ab3a48 -[NSData(NSData) writeToFile:atomically:] + 76
6 JouleBug 0x00109c5c -[LazyJSONModelMapper save] (LazyJSONModelMapper.m:106)
7 JouleBug 0x00109b40 __36-[LazyJSONModelMapper initWithFile:]_block_invoke_0 (LazyJSONModelMapper.m:63)
8 Foundation 0x31a856c2 -[__NSObserver _doit:] + 286
9 Foundation 0x31b1152a __67-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]_block_invoke_0 + 22
10 CoreFoundation 0x311d6540 ___CFXNotificationPost_block_invoke_0 + 64
11 CoreFoundation 0x31162090 _CFXNotificationPost + 1400
12 Foundation 0x31a853e4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
13 UIKit 0x3090524e -[UIApplication _handleApplicationSuspend:eventInfo:] + 786
14 UIKit 0x30895ef8 -[UIApplication handleEvent:withNewEvent:] + 2088
15 UIKit 0x30895560 -[UIApplication sendEvent:] + 48
16 UIKit 0x30894f34 _UIApplicationHandleEvent + 5820
17 GraphicsServices 0x331db224 PurpleEventCallback + 876
18 CoreFoundation 0x311deacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
19 CoreFoundation 0x311de32e __CFRunLoopDoSources0 + 358
20 CoreFoundation 0x311dd03e __CFRunLoopRun + 646
21 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
22 CoreFoundation 0x31160366 CFRunLoopRunInMode + 98
23 GraphicsServices 0x331da432 GSEventRunModal + 130
24 UIKit 0x308c3cce UIApplicationMain + 1074
25 JouleBug 0x00033ac6 main (main.m:14)
26 JouleBug 0x00003900 0x1000 + 10496
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x37e143a8 kevent + 24
1 libdispatch.dylib 0x35a2eea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x35a2ebc2 _dispatch_mgr_thread + 30
Thread 2:
0 libsystem_kernel.dylib 0x37e24cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x352aaf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x352aacc8 start_wqthread + 0
Thread 3 name: WebThread
Thread 3:
0 libsystem_kernel.dylib 0x37e240d8 __psynch_mutexwait + 24
1 libsystem_c.dylib 0x352a4674 pthread_mutex_lock + 376
2 WebCore 0x362614e8 _ZL17_WebTryThreadLockb + 208
3 WebCore 0x362c016c _ZL19SendDelegateMessageP12NSInvocation + 700
4 WebKit 0x36bfad80 -[_WebSafeForwarder forwardInvocation:] + 112
5 CoreFoundation 0x3120ca7c ___forwarding___ + 660
6 CoreFoundation 0x31167648 _CF_forwarding_prep_0 + 40
7 WebCore 0x3631bf7c WebCore::FrameLoader::finishedParsing() + 56
8 WebCore 0x3631bf12 WebCore::Document::finishedParsing() + 186
9 WebCore 0x3631be50 WebCore::HTMLTreeBuilder::finished() + 16
10 WebCore 0x3630cfbe WebCore::HTMLDocumentParser::prepareToStopParsing() + 106
11 WebCore 0x3630cc9e WebCore::HTMLDocumentParser::finish() + 90
12 WebCore 0x3630cc3a WebCore::Document::finishParsing() + 14
13 WebCore 0x36309e62 WebCore::DocumentWriter::endIfNotLoadingMainResource() + 74
14 WebCore 0x363084fa WebCore::DocumentLoader::finishedLoading() + 74
15 WebCore 0x363559c8 WebCore::FrameLoader::finishedLoading() + 48
16 WebCore 0x36355938 WebCore::MainResourceLoader::didFinishLoading(double) + 88
17 WebCore 0x363558c2 _ZN7WebCoreL16didFinishLoadingEP16_CFURLConnectionPKv + 46
18 CFNetwork 0x349997ee URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 186
19 CFNetwork 0x3498e49e URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 418
20 CFNetwork 0x3498e592 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 662
21 CFNetwork 0x3498e19c URLConnectionClient::processEvents() + 100
22 CFNetwork 0x3498e0d2 MultiplexerSource::perform() + 150
23 CoreFoundation 0x311deacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
24 CoreFoundation 0x311de32e __CFRunLoopDoSources0 + 358
25 CoreFoundation 0x311dd03e __CFRunLoopRun + 646
26 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
27 CoreFoundation 0x31160366 CFRunLoopRunInMode + 98
28 WebCore 0x36304c9c _ZL12RunWebThreadPv + 396
29 libsystem_c.dylib 0x352b072e _pthread_start + 314
30 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 4:
0 libsystem_kernel.dylib 0x37e14004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x37e141fa mach_msg + 50
2 CoreFoundation 0x311de3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311dd124 __CFRunLoopRun + 876
4 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x311dd444 CFRunLoopRun + 92
6 JouleBug 0x00071800 +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4772)
7 Foundation 0x31a92a7a -[NSThread main] + 66
8 Foundation 0x31b2658a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x352b072e _pthread_start + 314
10 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 5:
0 libsystem_kernel.dylib 0x37e14004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x37e141fa mach_msg + 50
2 CoreFoundation 0x311de3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311dd124 __CFRunLoopRun + 876
4 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x31160366 CFRunLoopRunInMode + 98
6 Foundation 0x31a92bb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x31a92a7a -[NSThread main] + 66
8 Foundation 0x31b2658a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x352b072e _pthread_start + 314
10 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 6 name: com.apple.CFSocket.private
Thread 6:
0 libsystem_kernel.dylib 0x37e24570 __select + 20
1 CoreFoundation 0x311e263a __CFSocketManager + 726
2 libsystem_c.dylib 0x352b072e _pthread_start + 314
3 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 7:
0 libsystem_kernel.dylib 0x37e14004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x37e141fa mach_msg + 50
2 CoreFoundation 0x311de3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311dd124 __CFRunLoopRun + 876
4 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x31160366 CFRunLoopRunInMode + 98
6 Foundation 0x31a86b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x31aa051c -[NSRunLoop(NSRunLoop) run] + 72
8 JouleBug 0x0014e516 0x1000 + 1365270
9 Foundation 0x31a92a7a -[NSThread main] + 66
10 Foundation 0x31b2658a __NSThread__main__ + 1042
11 libsystem_c.dylib 0x352b072e _pthread_start + 314
12 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 8 name: Dispatch queue: com.apple.root.default-priority
Thread 8:
0 libsystem_kernel.dylib 0x37e2451c __rename + 8
1 libsystem_kernel.dylib 0x37e15b6e rename + 2
2 Foundation 0x31ab3dac _NSWriteBytesToFileWithExtendedAttributes + 816
3 Foundation 0x31ab3a70 _NSWriteBytesToFile + 24
4 Foundation 0x31ab3a48 -[NSData(NSData) writeToFile:atomically:] + 76
5 JouleBug 0x00109c5c -[LazyJSONModelMapper save] (LazyJSONModelMapper.m:106)
6 JouleBug 0x00109a4e -[LazyJSONModelMapper initWithFile:] (LazyJSONModelMapper.m:85)
7 JouleBug 0x001097c6 -[LazyJSONModelMapper initWithData:fromFile:] (LazyJSONModelMapper.m:45)
8 JouleBug 0x00089e5c +[GameDataManager storePinFromPinDict:] (GameDataManager.m:238)
9 JouleBug 0x000dd378 +[GameDataLoader processData:] (GameDataLoader.m:62)
10 JouleBug 0x000ae300 +[DataLoader refreshDataSynchronously] (DataLoader.m:54)
11 JouleBug 0x000ae29c __25+[DataLoader refreshData]_block_invoke_0 (DataLoader.m:36)
12 Foundation 0x31acbe50 -[NSBlockOperation main] + 196
13 Foundation 0x31aad38c -[__NSOperationInternal start] + 856
14 JouleBug 0x000ccb06 -[TimedBlockOperation start] (NSOperationExtensions.m:96)
15 Foundation 0x31b1678c __block_global_6 + 96
16 libdispatch.dylib 0x35a22c52 _dispatch_call_block_and_release + 6
17 libdispatch.dylib 0x35a2e7b4 _dispatch_worker_thread2 + 256
18 libsystem_c.dylib 0x352aadf4 _pthread_wqthread + 288
19 libsystem_c.dylib 0x352aacc8 start_wqthread + 0
Thread 9:
0 libsystem_kernel.dylib 0x37e24cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x352aaf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x352aacc8 start_wqthread + 0
Thread 10:
0 libsystem_kernel.dylib 0x37e24cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x352aaf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x352aacc8 start_wqthread + 0
Thread 11 name: WebCore: CFNetwork Loader
Thread 11:
0 libsystem_kernel.dylib 0x37e14004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x37e141fa mach_msg + 50
2 CoreFoundation 0x311de3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311dd124 __CFRunLoopRun + 876
4 CoreFoundation 0x3116049e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x31160366 CFRunLoopRunInMode + 98
6 WebCore 0x3632e0d2 _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x352b072e _pthread_start + 314
8 libsystem_c.dylib 0x352b05e8 thread_start + 0
Thread 12:
0 libsystem_kernel.dylib 0x37e24cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x352aaf36 _pthread_wqthread + 610
2 libsystem_c.dylib 0x352aacc8 start_wqthread + 0
Unknown thread crashed with unknown flavor: 5, state_count: 1
I finally tracked this down. Just as in other similar incidents reported on Stack Overflow, this turned out to be a problem with a scheduled operation attempting to run in the background. My problem is resolved.