I have a simple table view controller driven by the fetchedResultsController and it crashes very often when I select it and the crash log is like this;
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xc21eb7ad
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3c0ce5d0 objc_msgSend + 16
1 UIKit 0x3623c564 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 404
2 UIKit 0x3622138c -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1312
3 UIKit 0x36238822 -[UITableView layoutSubviews] + 202
4 UIKit 0x361f48c2 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 254
5 QuartzCore 0x35fa050e -[CALayer layoutSublayers] + 210
6 QuartzCore 0x35fa00b0 CA::Layer::layout_if_needed(CA::Transaction*) + 456
7 QuartzCore 0x35fa0fd4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
8 QuartzCore 0x35fa09be CA::Context::commit_transaction(CA::Transaction*) + 234
9 QuartzCore 0x35fa07d0 CA::Transaction::commit() + 312
10 QuartzCore 0x35fa0634 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
11 CoreFoundation 0x343b793e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
12 CoreFoundation 0x343b5c34 __CFRunLoopDoObservers + 272
13 CoreFoundation 0x343b5f8e __CFRunLoopRun + 742
14 CoreFoundation 0x34329238 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x343290c4 CFRunLoopRunInMode + 100
16 GraphicsServices 0x37f07336 GSEventRunModal + 70
17 UIKit 0x362452b4 UIApplicationMain + 1116
18 Introdex 0x0011e538 0xa3000 + 505144
19 Introdex 0x000a5a24 0xa3000 + 10788
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3c5b75d0 kevent64 + 24
1 libdispatch.dylib 0x3c4f2d22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x3c4ee374 _dispatch_mgr_thread + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x3c5b6e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c5b6fd0 mach_msg + 48
2 CoreFoundation 0x343b72b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x343b602c __CFRunLoopRun + 900
4 CoreFoundation 0x34329238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x343290c4 CFRunLoopRunInMode + 100
6 WebCore 0x3a328390 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3c5200de _pthread_start + 306
8 libsystem_c.dylib 0x3c51ffa4 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x3c5b6e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c5b6fd0 mach_msg + 48
2 CoreFoundation 0x343b72b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x343b602c __CFRunLoopRun + 900
4 CoreFoundation 0x34329238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x343290c4 CFRunLoopRunInMode + 100
6 Foundation 0x34c4d5be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x34cf0c40 -[NSRunLoop(NSRunLoop) run] + 76
8 Introdex 0x0021924c 0xa3000 + 1532492
9 Foundation 0x34cfa22c __NSThread__main__ + 968
10 libsystem_c.dylib 0x3c5200de _pthread_start + 306
11 libsystem_c.dylib 0x3c51ffa4 thread_start + 4
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x3c5b6e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c5b6fd0 mach_msg + 48
2 CoreFoundation 0x343b72b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x343b602c __CFRunLoopRun + 900
4 CoreFoundation 0x34329238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x343290c4 CFRunLoopRunInMode + 100
6 Foundation 0x34c76888 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x34cfa22c __NSThread__main__ + 968
8 libsystem_c.dylib 0x3c5200de _pthread_start + 306
9 libsystem_c.dylib 0x3c51ffa4 thread_start + 4
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x3c5c7594 __select + 20
1 CoreFoundation 0x343bb474 __CFSocketManager + 676
2 libsystem_c.dylib 0x3c5200de _pthread_start + 306
3 libsystem_c.dylib 0x3c51ffa4 thread_start + 4
Thread 6 name: JavaScriptCore::BlockFree
Thread 6:
0 libsystem_kernel.dylib 0x3c5c708c __psynch_cvwait + 24
1 libsystem_c.dylib 0x3c518afc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x3c518870 pthread_cond_timedwait + 40
3 JavaScriptCore 0x382fddf6 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 102
4 JavaScriptCore 0x38410532 JSC::BlockAllocator::blockFreeingThreadMain() + 78
5 JavaScriptCore 0x38423030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x3c5200de _pthread_start + 306
7 libsystem_c.dylib 0x3c51ffa4 thread_start + 4
Thread 7 name: JavaScriptCore::Marking
Thread 7:
0 libsystem_kernel.dylib 0x3c5c708c __psynch_cvwait + 24
1 libsystem_c.dylib 0x3c518afc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x3c522cf8 pthread_cond_wait + 36
3 JavaScriptCore 0x383a36dc JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode) + 140
4 JavaScriptCore 0x383a3620 JSC::MarkStackThreadSharedData::markingThreadMain() + 140
5 JavaScriptCore 0x38423030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x3c5200de _pthread_start + 306
7 libsystem_c.dylib
Can somebody please explain me what this crash log means. I could not read it properly and do not know what this actually means. It would be really great if anyone could help me.
Without looking at your code, its hard to know where you going wrong.
But still as I know If you are able show the data on Table successfully and getting crash while click on particular row.
Below are some possibilities.
1). make sure you have declared UITableViewDelegate in your controller's header file.
Solution : make sure you have this (in .h file)
#interface FavViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>
2). forgot to hook-up delegate with File owner
Solution : Open Layout's XIB file --> select UITableView --> in Connection Inspector --> drag delegate to the File's Owner (as per the below image)
you can achieve same by doing it programmatically in your .m file's viewDidLoad method
favourite_tbl.delegate=self;//favourite_tbl is instance of myTableView
3). your didSelectRowAtIndexPath method (for click on row) should be like
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
selectedIndex = indexPath.row;
NSLog(#"you have selected %d",selectedIndex);
}
Feel free to drop me a comment if you have any trouble in this.
Related
I'm unable to understand this crash log from Apple. I have been a few times rejected because of this. They are complaining it's occurred on ipad running latest software 10.3.1. When we double check with on ipad simulator, it's running without crashes.
Last Exception Backtrace:
0 CoreFoundation 0x1848b2fd8 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x183314538 objc_exception_throw + 56
2 CoreFoundation 0x1848b2eac +[NSException raise:format:arguments:] + 104
3 Foundation 0x18534a710 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 UIKit 0x18ac57454 -[UIApplication _cachedSystemAnimationFenceCreatingIfNecessary:] + 196
5 UIKit 0x18ac57514 -[UIApplication _systemAnimationFenceCreatingIfNecessary:] + 24
6 UIKit 0x18acb07a0 +[UIWindow _synchronizedDrawingFence] + 116
7 UIKit 0x18ae6e150 +[_UIKeyboardChangedInformation informationForKeyboardUp:withIAV:] + 104
8 UIKit 0x18b1678d4 -[_UIRemoteKeyboards prepareToMoveKeyboard:withIAV:showing:forScreen:] + 464
9 UIKit 0x18aa9fc04 -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 820
10 UIKit 0x18aabccf4 -[UIPeripheralHost(UIKitInternal) _restoreInputViewsWithId:animated:] + 584
11 UIKit 0x18ad4fd64 -[UIViewController _restoreInputViewsForPresentation] + 280
12 UIKit 0x18ad2ae3c -[UIPresentationController runTransitionForCurrentState] + 1560
13 UIKit 0x18ad290f8 -[UIPresentationController _dismissWithAnimationController:interactionController:target:didEndSelector:] + 764
14 UIKit 0x18ad4f8c0 -[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:] + 464
15 UIKit 0x18ab04cd4 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 600
16 UIKit 0x18aaacb6c -[UIViewController dismissViewControllerWithTransition:completion:] + 1144
17 UIKit 0x18aaac94c -[UIViewController dismissViewControllerWithTransition:completion:] + 600
18 UIKit 0x18ad4eb68 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 524
19 UIKit 0x18aaac6c0 -[UIViewController dismissViewControllerAnimated:completion:] + 152
20 newapp 0x100115628 0x1000b0000 + 415272
21 newapp 0x1001159e8 0x1000b0000 + 416232
22 CFNetwork 0x184ebc1fc __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
23 CFNetwork 0x184ed3ef8 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 148
24 Foundation 0x185381804 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
25 Foundation 0x1852c6760 -[NSBlockOperation main] + 96
26 Foundation 0x1852b6b18 -[__NSOperationInternal _start:] + 612
27 Foundation 0x185383ba0 __NSOQSchedule_f + 228
28 libdispatch.dylib 0x18376a9a0 _dispatch_client_callout + 16
29 libdispatch.dylib 0x183778ad4 _dispatch_queue_serial_drain + 928
30 libdispatch.dylib 0x18376e2cc _dispatch_queue_invoke + 884
31 libdispatch.dylib 0x18377aa50 _dispatch_root_queue_drain + 540
32 libdispatch.dylib 0x18377a7d0 _dispatch_worker_thread3 + 124
33 libsystem_pthread.dylib 0x1839731d0 _pthread_wqthread + 1096
34 libsystem_pthread.dylib 0x183972d7c start_wqthread + 4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x000000018388f224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018388f09c mach_msg + 72
2 CoreFoundation 0x0000000184860e88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018485eadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018478ed94 CFRunLoopRunSpecific + 424
5 GraphicsServices 0x00000001861f8074 GSEventRunModal + 100
6 UIKit 0x000000018aa40130 UIApplicationMain + 208
7 newapp 0x000000010022f390 0x1000b0000 + 1569680
8 libdyld.dylib 0x000000018379d59c start + 4
Thread 1 name: com.apple.uikit.eventfetch-thread
Thread 1:
0 libsystem_kernel.dylib 0x000000018388f224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018388f09c mach_msg + 72
2 CoreFoundation 0x0000000184860e88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018485eadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018478ed94 CFRunLoopRunSpecific + 424
5 Foundation 0x00000001852a8d64 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x00000001852c9b34 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKit 0x000000018b3ca5f8 -[UIEventFetcher threadMain] + 136
8 Foundation 0x00000001853a62c8 __NSThread__start__ + 996
9 libsystem_pthread.dylib 0x000000018397575c _pthread_body + 240
10 libsystem_pthread.dylib 0x000000018397566c _pthread_body + 0
11 libsystem_pthread.dylib 0x0000000183972d84 thread_start + 4
Thread 2:
0 libsystem_kernel.dylib 0x00000001838ada88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000183973274 _pthread_wqthread + 1260
2 libsystem_pthread.dylib 0x0000000183972d7c start_wqthread + 4
Thread 3 name: com.apple.CFStream.LegacyThread
Thread 3:
0 libsystem_kernel.dylib 0x000000018388f224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018388f09c mach_msg + 72
2 CoreFoundation 0x0000000184860e88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018485eadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018478ed94 CFRunLoopRunSpecific + 424
5 CoreFoundation 0x000000018486e78c _legacyStreamRunLoop_workThread + 268
6 libsystem_pthread.dylib 0x000000018397575c _pthread_body + 240
7 libsystem_pthread.dylib 0x000000018397566c _pthread_body + 0
8 libsystem_pthread.dylib 0x0000000183972d84 thread_start + 4
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x000000018388f224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018388f09c mach_msg + 72
2 CoreFoundation 0x0000000184860e88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018485eadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018478ed94 CFRunLoopRunSpecific + 424
5 CFNetwork 0x0000000184f9aca4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404
6 Foundation 0x00000001853a62c8 __NSThread__start__ + 996
7 libsystem_pthread.dylib 0x000000018397575c _pthread_body + 240
8 libsystem_pthread.dylib 0x000000018397566c _pthread_body + 0
9 libsystem_pthread.dylib 0x0000000183972d84 thread_start + 4
Thread 5 name: Dispatch queue: NSOperationQueue 0x170031360 :: NSOperation 0x17024ab30 (QOS: DEFAULT)
Thread 5 Crashed:
0 libsystem_kernel.dylib 0x00000001838ad014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000183977334 pthread_kill + 112
2 libsystem_c.dylib 0x00000001838219c4 abort + 140
3 libc++abi.dylib 0x00000001832ed1b0 __cxa_bad_cast + 0
4 libc++abi.dylib 0x0000000183306c04 default_unexpected_handler() + 0
5 libobjc.A.dylib 0x0000000183314820 _objc_terminate() + 124
6 libc++abi.dylib 0x00000001833035d4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x0000000183303640 std::terminate() + 60
8 libdispatch.dylib 0x000000018376a9b4 _dispatch_client_callout + 36
9 libdispatch.dylib 0x0000000183778ad4 _dispatch_queue_serial_drain + 928
10 libdispatch.dylib 0x000000018376e2cc _dispatch_queue_invoke + 884
11 libdispatch.dylib 0x000000018377aa50 _dispatch_root_queue_drain + 540
12 libdispatch.dylib 0x000000018377a7d0 _dispatch_worker_thread3 + 124
13 libsystem_pthread.dylib 0x00000001839731d0 _pthread_wqthread + 1096
14 libsystem_pthread.dylib 0x0000000183972d7c start_wqthread + 4
The log clearly shows the problem happens on a background thread. You need to perform UI actions on the main queue. Use DispatchQueue.main.async to dismiss the view controller.
I got a iPhone crash report when my app is brought to foreground, before that, the app is deleting some files, and i press HOME button to bring it background.
the weird thing is in the crash report, the Highlighted Thread is not 0, in my memory, the code 0x8badf00d exception's highlighted thread is always 0.
the thread 5 is doing some database operation, i used FMDB's queue mechanism to avoid multi-threads competition.
i wander know why the highlighted thread is 5 ? is the thread 5 block the main thread ?
Thanks for any help you can offer.
here is the crash report:
Date/Time: 2013-10-30 15:37:24.620 +0800
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread: 5
Application Specific Information:
com.xxxx.xxxx failed to resume in time
Elapsed total CPU time (seconds): 10.010 (user 10.010, system 0.000), 100% CPU
Elapsed application CPU time (seconds): 7.631, 76% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x3b9bcc80 __unlink + 8
1 libsystem_kernel.dylib 0x3b9ae8bc unlink + 4
2 libremovefile.dylib 0x3b9027f8 __removefile_process_file + 236
3 libremovefile.dylib 0x3b90288a __removefile_tree_walker + 114
4 libremovefile.dylib 0x3b902a72 removefile + 118
5 Foundation 0x340cec4e -[NSFilesystemItemRemoveOperation main] + 170
6 Foundation 0x340cd5bc -[__NSOperationInternal start] + 836
7 Foundation 0x340cc4fc -[NSFileManager removeItemAtPath:error:] + 80
8 mCloud_iPhone 0x003037ae -[SDImageCache clearDisk] (SDImageCache.m:413)
9 mCloud_iPhone 0x0032a1d2 -[AppSettingViewController clearCachesEvent:] (AppSettingViewController.m:365)
10 UIKit 0x357330c0 -[UIApplication sendAction:to:from:forEvent:] + 68
11 UIKit 0x35733072 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
12 UIKit 0x35733050 -[UIControl sendAction:to:forEvent:] + 40
13 UIKit 0x35732906 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
14 UIKit 0x35732dfc -[UIControl touchesEnded:withEvent:] + 484
15 UIKit 0x3565141c _UIGestureRecognizerUpdate + 5764
16 CoreFoundation 0x338156ca __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
17 CoreFoundation 0x338139bc __CFRunLoopDoObservers + 272
18 CoreFoundation 0x33813d12 __CFRunLoopRun + 738
19 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
20 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
21 GraphicsServices 0x373392e6 GSEventRunModal + 70
22 UIKit 0x3569c2fc UIApplicationMain + 1116
23 mCloud_iPhone 0x002d7c06 main (main.m:16)
24 mCloud_iPhone 0x002d7bc8 ___lldb_unnamed_function8568$$mCloud_iPhone + 36
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3b9ac648 kevent64 + 24
1 libdispatch.dylib 0x3b8e54ec _dispatch_mgr_invoke + 792
2 libdispatch.dylib 0x3b8d7df4 _dispatch_mgr_thread$VARIANT$up + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 WebCore 0x39774500 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3b91530e _pthread_start + 306
8 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 3 name: com.crashlytics.MachExceptionServer
Thread 3:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 mCloud_iPhone 0x00488940 ___lldb_unnamed_function16966$$mCloud_iPhone + 116
3 libsystem_c.dylib 0x3b91530e _pthread_start + 306
4 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 mCloud_iPhone 0x003ec330 -[FXThreadManager threadFunc:] (FXThreadManager.m:263)
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 5 name: Dispatch queue: fmdb.<FMDatabaseQueue: 0x1ede9bc0>
Thread 5:
0 libsqlite3.dylib 0x3b6e127c ___lldb_unnamed_function124$$libsqlite3.dylib + 35596
1 libsqlite3.dylib 0x3b6d8482 sqlite3_step + 2138
2 mCloud_iPhone 0x00429fca -[FMResultSet next] (FMResultSet.m:155)
3 mCloud_iPhone 0x00454930 +[FXDatabaseOperator query:withVAList:withDatabase:resultType:] (FXDatabaseOperator.m:182)
4 mCloud_iPhone 0x00454f54 __44+[FXDatabaseOperator queryWithDBFileID:sql:]_block_invoke (FXDatabaseOperator.m:236)
5 mCloud_iPhone 0x00453124 __30-[FMDatabaseQueue inDatabase:]_block_invoke (FMDatabaseQueue.m:101)
6 libdispatch.dylib 0x3b8d54b4 _dispatch_client_callout + 20
7 libdispatch.dylib 0x3b8e390a _dispatch_barrier_sync_f_invoke + 22
8 mCloud_iPhone 0x00453098 -[FMDatabaseQueue inDatabase:] (FMDatabaseQueue.m:98)
9 mCloud_iPhone 0x00454e16 +[FXDatabaseOperator queryWithDBFileID:sql:] (FXDatabaseOperator.m:235)
10 mCloud_iPhone 0x000c5804 -[DatabaseManager queryPhotoBackupByFileName:] (DatabaseManager.m:1233)
11 mCloud_iPhone 0x000dda50 -[CameraBackupManager queryBackUpDb:] (CameraBackupManager.m:2867)
12 mCloud_iPhone 0x000d3bc4 __43-[CameraBackupManager synSystemlibraryToDb]_block_invoke_2 (CameraBackupManager.m:514)
13 AssetsLibrary 0x330c7c5e __62-[ALAssetsGroup _enumerateAssetsAtIndexes:options:usingBlock:]_block_invoke_0125 + 102
14 CoreFoundation 0x3383499e __NSArrayEnumerate + 394
15 CoreFoundation 0x33796b66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
16 AssetsLibrary 0x330c78be -[ALAssetsGroup _enumerateAssetsAtIndexes:options:usingBlock:] + 718
17 AssetsLibrary 0x330c7cd4 -[ALAssetsGroup enumerateAssetsUsingBlock:] + 24
18 AssetsLibrary 0x330c9a0a __block_global_1 + 26
19 CoreFoundation 0x3383499e __NSArrayEnumerate + 394
20 CoreFoundation 0x33796b66 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 58
21 AssetsLibrary 0x330c9866 __block_global_0 + 1014
22 libdispatch.dylib 0x3b8d611c _dispatch_call_block_and_release + 8
23 libdispatch.dylib 0x3b8e4254 _dispatch_root_queue_drain + 256
24 libdispatch.dylib 0x3b8e43b4 _dispatch_worker_thread2 + 80
25 libsystem_c.dylib 0x3b90aa0e _pthread_wqthread + 358
26 libsystem_c.dylib 0x3b90a8a0 start_wqthread + 4
Thread 6:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 mCloud_iPhone 0x003ec330 -[FXThreadManager threadFunc:] (FXThreadManager.m:263)
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 7:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 mCloud_iPhone 0x00415acc +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4966)
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 8 name: com.apple.NSURLConnectionLoader
Thread 8:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 Foundation 0x340d33d0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x3b9bc594 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x338191f2 __CFSocketManager + 674
2 libsystem_c.dylib 0x3b91530e _pthread_start + 306
3 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 10:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 Foundation 0x340a9f92 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x3414d860 -[NSRunLoop(NSRunLoop) run] + 76
8 Foundation 0x34156e80 __NSThread__main__ + 968
9 libsystem_c.dylib 0x3b91530e _pthread_start + 306
10 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 11:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 mCloud_iPhone 0x003ec330 -[FXThreadManager threadFunc:] (FXThreadManager.m:263)
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 12:
0 libsystem_kernel.dylib 0x3b9abf04 semaphore_wait_trap + 8
1 libdispatch.dylib 0x3b8e482a _dispatch_semaphore_wait_slow + 178
2 TCC 0x38ef6682 TCCAccessPreflight + 218
3 AddressBook 0x32fbc048 ABAddressBookGetAuthorizationStatus + 4
4 mCloud_iPhone 0x00132116 -[AddrBookObject accessToContacts] (AddrBookObject.m:141)
5 mCloud_iPhone 0x00143fb8 -[ApnsManager isNotificationEnabled] (ApnsManager.m:96)
6 mCloud_iPhone 0x0010798a -[AddressBookManager queryAutoSynSwitchStateForServer] (AddressBookManager.m:1046)
7 mCloud_iPhone 0x00107876 __50-[AddressBookManager accessToTheServerSwitchState]_block_invoke (AddressBookManager.m:1008)
8 libdispatch.dylib 0x3b8d611c _dispatch_call_block_and_release + 8
9 libdispatch.dylib 0x3b8d5996 _dispatch_queue_drain$VARIANT$up + 142
10 libdispatch.dylib 0x3b8d5890 _dispatch_queue_invoke$VARIANT$up + 32
11 libdispatch.dylib 0x3b8e4212 _dispatch_root_queue_drain + 190
12 libdispatch.dylib 0x3b8e43b4 _dispatch_worker_thread2 + 80
13 libsystem_c.dylib 0x3b90aa0e _pthread_wqthread + 358
14 libsystem_c.dylib 0x3b90a8a0 start_wqthread + 4
Thread 13:
0 libsystem_kernel.dylib 0x3b9abeb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3b9ac048 mach_msg + 36
2 CoreFoundation 0x33815040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x33813d9e __CFRunLoopRun + 878
4 CoreFoundation 0x33786eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x33786d44 CFRunLoopRunInMode + 100
6 mCloud_iPhone 0x003ec330 -[FXThreadManager threadFunc:] (FXThreadManager.m:263)
7 Foundation 0x34156e80 __NSThread__main__ + 968
8 libsystem_c.dylib 0x3b91530e _pthread_start + 306
9 libsystem_c.dylib 0x3b9151d4 thread_start + 4
Thread 14 name: Dispatch queue: fmdb.<FMDatabaseQueue: 0x1fbdf850>
Thread 14:
0 libsystem_kernel.dylib 0x3b9ae898 pwrite + 20
1 libsqlite3.dylib 0x3b72e5c0 ___lldb_unnamed_function725$$libsqlite3.dylib + 44
2 libsqlite3.dylib 0x3b6eedc8 ___lldb_unnamed_function200$$libsqlite3.dylib + 52
3 libsqlite3.dylib 0x3b6ec332 ___lldb_unnamed_function190$$libsqlite3.dylib + 1106
4 libsqlite3.dylib 0x3b6ebed2 ___lldb_unnamed_function189$$libsqlite3.dylib + 574
5 libsqlite3.dylib 0x3b6ee126 ___lldb_unnamed_function195$$libsqlite3.dylib + 1150
6 libsqlite3.dylib 0x3b6da2ba ___lldb_unnamed_function124$$libsqlite3.dylib + 6986
7 libsqlite3.dylib 0x3b6d8482 sqlite3_step + 2138
8 mCloud_iPhone 0x00426fee -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (FMDatabase.m:902)
9 mCloud_iPhone 0x00455e20 +[FXDatabaseOperator updateInTransaction:sql:] (FXDatabaseOperator.m:345)
10 mCloud_iPhone 0x00250d44 __41-[NDDatabaseManager updateTransferTasks:]_block_invoke_0 (NDDatabaseManager.m:2353)
11 mCloud_iPhone 0x00455bb8 __55+[FXDatabaseOperator doTransactionWithDBFileID:action:]_block_invoke (FXDatabaseOperator.m:307)
12 mCloud_iPhone 0x004533b4 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke (FMDatabaseQueue.m:125)
13 libdispatch.dylib 0x3b8d54b4 _dispatch_client_callout + 20
14 libdispatch.dylib 0x3b8e390a _dispatch_barrier_sync_f_invoke + 22
15 mCloud_iPhone 0x00453286 -[FMDatabaseQueue beginTransaction:withBlock:] (FMDatabaseQueue.m:114)
16 mCloud_iPhone 0x0045353e -[FMDatabaseQueue inTransaction:] (FMDatabaseQueue.m:143)
17 mCloud_iPhone 0x00455a6e +[FXDatabaseOperator doTransactionWithDBFileID:action:] (FXDatabaseOperator.m:303)
18 mCloud_iPhone 0x0025071c -[NDDatabaseManager updateTransferTasks:] (NDDatabaseManager.m:2386)
19 mCloud_iPhone 0x002b14ae __50-[NDTransTaskDataManager startAllAutoPausedTasks:]_block_invoke_0 (NDTransTaskDataManager.m:1212)
20 libdispatch.dylib 0x3b8d611c _dispatch_call_block_and_release + 8
21 libdispatch.dylib 0x3b8e4254 _dispatch_root_queue_drain + 256
22 libdispatch.dylib 0x3b8e43b4 _dispatch_worker_thread2 + 80
23 libsystem_c.dylib 0x3b90aa0e _pthread_wqthread + 358
24 libsystem_c.dylib 0x3b90a8a0 start_wqthread + 4
Unknown thread crashed with unknown flavor: 5, state_count: 1
0x8badf00d: Reads as “ate bad food”! (If you squint your eyes and replace the digits with alphabetic characters. :p) This code indicates that an application was terminated by iOS because a watchdog timeout occurred. Basically, the application took too long to launch, terminate, or respond to system events.
http://www.raywenderlich.com/19788
I'm using Crittercism (SDK 3.5.1) crash reporting service to catch reports on my iOS app.
i've been getting this error many times and i've no idea why it's happening.
Name: SIGSEGV - Reason: Main
Here is the full report from Crittercism:
Threads
_________________________________
Thread: Unknown Name (Crashed)
0 libobjc.A.dylib 0x39917526 objc_retain + 6
1 UIKit 0x33a92ab3 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 159
2 UIKit 0x33b078ef -[UIViewAnimationState animationDidStop:finished:] + 51
3 QuartzCore 0x3383cc01 _ZN2CA5Layer23run_animation_callbacksEPv + 209
4 libdispatch.dylib 0x39d314b7 _dispatch_client_callout + 23
5 libdispatch.dylib 0x39d32dcb _dispatch_main_queue_callback_4CF$VARIANT$up + 227
6 CoreFoundation 0x31c48f3b __CFRunLoopRun + 1291
7 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
8 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
9 GraphicsServices 0x3577f2eb GSEventRunModal + 75
10 UIKit 0x33ad1301 UIApplicationMain + 1121
11 MyAppName 0x0002e29b main (main.m:17)
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e08648 kevent64 + 24
1 libdispatch.dylib 0x39d33df8 _dispatch_mgr_thread$VARIANT$up + 36
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 WebCore 0x37bba505 _ZL12RunWebThreadPv + 445
6 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 Foundation 0x325083d5 +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6 Foundation 0x3258be85 __NSThread__main__ + 973
7 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 Foundation 0x324def97 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 255
6 Foundation 0x32582865 -[NSRunLoop(NSRunLoop) run] + 81
7 MyAppName 0x001000c1 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:182)
8 Foundation 0x3258be85 __NSThread__main__ + 973
9 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18594 select$DARWIN_EXTSN + 20
1 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Crashed Registers
_________________________________
r12 0xb9e49
r10 0x0
r11 0x10
cpsr 0x30
r4 0x1fb79160
r5 0x1f4158
r6 0x33efe80f
r7 0x2fdd9e84
r0 0x1fb16050
r1 0x80000000
r2 0x2
r3 0x790ca8e9
sp 0x2fdd9e78
r8 0x1
r9 0xa25701
pc 0x39917526
lr 0xb9095
First guess would be that a delegate you've set with something like:
[UIView setAnimationDelegate:self];
has been freed before the animation has finished.
Does anyone have any insight on why this crash log is happening? The app records the locations where the user goes. So it has the UIBackgroundModes's Location is set in Info.plist to continue getting location updates in background. According to the log, something seems to crash after 10 minutes.
Incident Identifier: 4BA294E8-0DDF-4EC2-812A-20394F758A7F
CrashReporter Key: 59997a4e160853691bc673802439c8c4b9ca7ba3
Hardware Model: iPhone3,1
Process: MyMapApp [1234]
Path: /var/mobile/Applications/826E35FE-F6B7-477E-943E-CE18D0D03145/MyMapApp.app/MyMapApp
Identifier: MyMapApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-03-02 13:25:05.228 -0600
OS Version: iPhone OS 4.2.1 (8C148)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
MyMapApp[1234] has active assertions beyond permitted time:
{(
<SBProcessAssertion: 0x63a07a0> identifier: CoreLocationRegistration process: MyMapApp[1234] permittedBackgroundDuration: 600.000000 reason: finishTask owner pid:1234 preventSuspend preventIdleSleep ,
<SBProcessAssertion: 0xa095050> identifier: CoreLocationBackgroundClient process: MyMapApp[1234] permittedBackgroundDuration: 600.000000 reason: finishTask owner pid:1234 preventSuspend preventIdleSleep
)}
Elapsed total CPU time (seconds): 43.660 (user 17.920, system 25.740), 7% CPU
Elapsed application CPU time (seconds): 1.500, 0% CPU
Thread 0:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 GraphicsServices 0x33b0e4a4 GSEventRunModal + 108
7 GraphicsServices 0x33b0e550 GSEventRun + 56
8 UIKit 0x32099322 -[UIApplication _run] + 406
9 UIKit 0x32096e8c UIApplicationMain + 664
10 MyMapApp 0x00105546 main (main.m:50)
11 MyMapApp 0x00003f4c start + 44
Thread 1:
0 libSystem.B.dylib 0x33b89974 kevent + 24
1 libSystem.B.dylib 0x33c33704 _dispatch_mgr_invoke + 88
2 libSystem.B.dylib 0x33c33174 _dispatch_queue_invoke + 96
3 libSystem.B.dylib 0x33c32b98 _dispatch_worker_thread2 + 120
4 libSystem.B.dylib 0x33bd724a _pthread_wqthread + 258
5 libSystem.B.dylib 0x33bcf970 start_wqthread + 0
Thread 2:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 WebCore 0x304df124 RunWebThread(void*) + 332
7 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
8 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 3:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 Foundation 0x336465f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7 Foundation 0x33624192 -[NSThread main] + 38
8 Foundation 0x3361d242 __NSThread__main__ + 966
9 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
10 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 4:
0 libSystem.B.dylib 0x33bd59f0 __semwait_signal + 24
1 libSystem.B.dylib 0x33b8a7ec _pthread_cond_wait + 748
2 libSystem.B.dylib 0x33b8a3d2 pthread_cond_wait + 26
3 CoreMedia 0x31a41b14 WaitOnCondition + 4
4 CoreMedia 0x31a41a5a FigSemaphoreWaitRelative + 66
5 MediaToolbox 0x300c0c9c fpa_AsyncMovieControlThread + 48
6 CoreMedia 0x31a5df76 figThreadMain + 166
7 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
8 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 5:
0 libSystem.B.dylib 0x33b8168c select$DARWIN_EXTSN + 20
1 CoreFoundation 0x33a7f662 __CFSocketManager + 582
2 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
3 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 6:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 MapKit 0x31be8906 TileCachePrivate::runCacheThread() + 274
7 MapKit 0x31be87ea _runCacheThread(void*) + 2
8 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
9 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 7:
0 libSystem.B.dylib 0x33bd59f0 __semwait_signal + 24
1 libSystem.B.dylib 0x33b8a7ec _pthread_cond_wait + 748
2 libSystem.B.dylib 0x33b8a3d2 pthread_cond_wait + 26
3 QuartzCore 0x3412e5dc CA::DispatchGroup::thread(void*) + 84
4 QuartzCore 0x340fb01a thread_fun + 10
5 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
6 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 8:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 MapKit 0x31bf327e +[NSThread(MKAdditions) _mapkit_runThread:] + 334
7 Foundation 0x33624192 -[NSThread main] + 38
8 Foundation 0x3361d242 __NSThread__main__ + 966
9 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
10 libSystem.B.dylib 0x33bcba88 thread_start + 0
Thread 9:
0 libSystem.B.dylib 0x33b5d268 mach_msg_trap + 20
1 libSystem.B.dylib 0x33b5f354 mach_msg + 44
2 CoreFoundation 0x33a48648 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x33a47ed2 __CFRunLoopRun + 350
4 CoreFoundation 0x33a47c80 CFRunLoopRunSpecific + 224
5 CoreFoundation 0x33a47b88 CFRunLoopRunInMode + 52
6 AudioToolbox 0x316504ba GenericRunLoopThread::RunLoop() + 30
7 AudioToolbox 0x31663306 TRunLoop<AQClient>::Entry(void*) + 90
8 AudioToolbox 0x316501d2 CAPThread::Entry(CAPThread*) + 138
9 libSystem.B.dylib 0x33bd6886 _pthread_start + 242
10 libSystem.B.dylib 0x33bcba88 thread_start + 0
Unknown thread crashed with unknown flavor: 5, state_count: 1
Are you by any chance calling beginBackgroundTaskWithExpirationHandler: without calling a corresponding endBackgroundTask:?
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
i'm running my app are running fine until i resume from background or with out location services, the app will crash.
the crash log shows Exception Type: EXC_CRASH (SIGTRAP)
Anybody know how to debug it ?
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x36398848 __kill + 8
1 FrogFinder 0x000b5034 0x69000 + 311348
2 CoreFoundation 0x3447e980 __handleUncaughtException + 68
3 libobjc.A.dylib 0x346ce2ca _objc_terminate + 122
4 libc++abi.dylib 0x338a33be _ZL19safe_handler_callerPFvvE + 70
5 libc++abi.dylib 0x338a344a std::terminate() + 14
6 libc++abi.dylib 0x338a481e __cxa_rethrow + 82
7 libobjc.A.dylib 0x346ce22e objc_exception_rethrow + 6
8 CoreFoundation 0x343d453e CFRunLoopRunSpecific + 398
9 CoreFoundation 0x343d439e CFRunLoopRunInMode + 98
10 GraphicsServices 0x30c58fc6 GSEventRunModal + 150
11 UIKit 0x3785573c UIApplicationMain + 1084
12 FrogFinder 0x0006a7e6 0x69000 + 6118
13 FrogFinder 0x0006a7a4 0x69000 + 6052
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x363893b4 kevent + 24
1 libdispatch.dylib 0x370b3e78 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x370b3b96 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x36389010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36389206 mach_msg + 50
2 CoreFoundation 0x3445241c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x34451154 __CFRunLoopRun + 876
4 CoreFoundation 0x343d44d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x343d439e CFRunLoopRunInMode + 98
6 WebCore 0x368a8128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x33224c16 _pthread_start + 314
8 libsystem_c.dylib 0x33224ad0 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x36389010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36389206 mach_msg + 50
2 CoreFoundation 0x3445241c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x34451154 __CFRunLoopRun + 876
4 CoreFoundation 0x343d44d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x343d439e CFRunLoopRunInMode + 98
6 Foundation 0x35dd4bc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x35dd4a8a -[NSThread main] + 66
8 Foundation 0x35e6859a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x33224c16 _pthread_start + 314
10 libsystem_c.dylib 0x33224ad0 thread_start + 0
Thread 4:
0 libsystem_kernel.dylib 0x36389010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36389206 mach_msg + 50
2 CoreFoundation 0x3445241c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x34451154 __CFRunLoopRun + 876
4 CoreFoundation 0x343d44d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x343d439e CFRunLoopRunInMode + 98
6 Foundation 0x35dc8b7e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x35de252c -[NSRunLoop(NSRunLoop) run] + 72
8 FrogFinder 0x000c8da6 0x69000 + 392614
9 Foundation 0x35dd4a8a -[NSThread main] + 66
10 Foundation 0x35e6859a __NSThread__main__ + 1042
11 libsystem_c.dylib 0x33224c16 _pthread_start + 314
12 libsystem_c.dylib 0x33224ad0 thread_start + 0
Thread 5 name: NetworkIO
Thread 5:
0 libsystem_kernel.dylib 0x36389010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36389206 mach_msg + 50
2 CoreFoundation 0x3445241c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x34451154 __CFRunLoopRun + 876
4 CoreFoundation 0x343d44d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x343d439e CFRunLoopRunInMode + 98
6 MapKit 0x38030412 0x38022000 + 58386
7 Foundation 0x35dd4a8a -[NSThread main] + 66
8 Foundation 0x35e6859a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x33224c16 _pthread_start + 314
10 libsystem_c.dylib 0x33224ad0 thread_start + 0
You can also turn on Exception breakpoints. In XCode 4 click your project and choose the breakpoints tab. At the bottom of that tab is | + | - | search bar. Choose the + item and "Add Exeception Breakpoint". You can leave it at All or choose Objective-C. This way you will break in the debugger and be able to see what caused the exeception.
With Xcode 4.2 and iOS 5 uncaught exceptions do not seem to show in the console anymore. I would recommend adding the following or modifying your existing uncaught exception handler to dump the exceptions callstack for you.
#ifdef DEBUG
void eHandler(NSException *);
void eHandler(NSException *exception) {
NSLog(#"%#", exception);
NSLog(#"%#", [exception callStackSymbols]);
}
#endif
int main(int argc, char *argv[]) {
#ifdef DEBUG
NSSetUncaughtExceptionHandler(&eHandler);
#endif
...rest of your main function here...
}
The easiest way for this kind of crashes which are occuring during development is to add exception break points.
You can add exception breakpoint like below
Select the break points option in left menu in XCode
Add the exception break point
Add breakpoint for all the exceptions
Run the app. In most of the cases when exception occurs XCode will stop the execution and show you the line which caused the exception.