1

当我的应用程序被带到前台时,我收到了 iPhone 崩溃报告,在此之前,该应用程序正在删除一些文件,我按 HOME 按钮将其带到后台。

奇怪的是在崩溃报告中,Highlighted Thread 不是 0,在我的记忆中,代码 0x8badf00d 异常的高亮线程总是 0。

线程 5 正在做一些数据库操作,我使用 FMDB 的队列机制来避免多线程竞争。

我想知道为什么突出显示的线程是 5 ?线程 5 阻塞了主线程吗?

谢谢你尽你所能的帮助。

这是崩溃报告:

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 
4

1 回答 1

1

0x8badf00d:读作“吃了不好的食物”!(如果你眯着眼睛用字母字符替换数字。:p)此代码表示应用程序已被 iOS 终止,因为发生了看门狗超时。基本上,应用程序启动、终止或响应系统事件的时间过长。

http://www.raywenderlich.com/19788

于 2013-11-18T11:10:16.567 回答