先来看看这个没有崩溃堆栈NO_CRASH_STACK的崩溃日志,这个崩溃数量最多
日志1
Incident Identifier: ********
Hardware Model: iPhone9,1
Process: ****** [2862]
Path: /private/var/containers/Bundle/Application/******
Identifier: ******
Version: ******
AppStoreTools: *****
AppVariant: 1:iPhone9,1:13
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: ******* [864]
Date/Time: 2020-07-21 16:05:48.5873 +0800
Launch Time: 2020-07-21 16:00:57.3679 +0800
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: 7.60.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 26
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001844c5198 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001844c460c mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000018466f468 __CFRunLoopServiceMachPort + 148 (CFRunLoop.c:2575)
3 CoreFoundation 0x000000018466a49c __CFRunLoopRun + 1160 (CFRunLoop.c:2931)
4 CoreFoundation 0x0000000184669ce8 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3192)
5 GraphicsServices 0x000000018e7b438c GSEventRunModal + 160 (GSEvent.c:2246)
6 UIKitCore 0x0000000188798444 UIApplicationMain + 1932 (UIApplication.m:4823)
7 ************** 0x00000001047583ec main + 312
8 libdyld.dylib 0x00000001844f18f0 start + 4
。
。
。
Thread 26 name:
Thread 26 Crashed:
0 libsystem_kernel.dylib 0x00000001844e6d88 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001843ff1e8 pthread_kill$VARIANT$mp + 136 (pthread.c:1458)
2 libsystem_c.dylib 0x0000000184352934 abort + 100 (abort.c:110)
3 libc++abi.dylib 0x00000001844bacc0 abort_message + 128 (abort_message.cpp:76)
4 libc++abi.dylib 0x00000001844acdf8 demangling_terminate_handler() + 272 (cxa_default_handlers.cpp:60)
5 libobjc.A.dylib 0x0000000184413e90 _objc_terminate() + 140 (objc-exception.mm:704)
6 libc++abi.dylib 0x00000001844ba14c std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x00000001844ba0e4 std::terminate() + 44 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x00000001843b7538 _dispatch_client_callout + 36 (object.m:498)
9 libdispatch.dylib 0x000000018435fe98 _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2484)
10 libdispatch.dylib 0x0000000184370430 _dispatch_source_invoke$VARIANT$mp + 1276 (source.c:568)
11 libdispatch.dylib 0x0000000184363770 _dispatch_lane_serial_drain$VARIANT$mp + 300 (inline_internal.h:2525)
12 libdispatch.dylib 0x0000000184364294 _dispatch_lane_invoke$VARIANT$mp + 416 (queue.c:3863)
13 libdispatch.dylib 0x000000018436d78c _dispatch_workloop_worker_thread + 588 (queue.c:6445)
14 libsystem_pthread.dylib 0x0000000184408b74 _pthread_wqthread + 272 (pthread.c:2351)
15 libsystem_pthread.dylib 0x000000018440b740 start_wqthread + 8
。
。
。
从崩溃时间上可以看到是应用启动后5分钟闪退的。
然后其他有用的信息很少了。
该如何处理呢?
1.先用这个日志和正常的崩溃日志比较一下,看看非crash的线程是否基本一致,
经查看,可以确定和正常崩溃的非崩溃线程基本一样。
不能确定是走到了某特定功能引起的崩溃
2.查看其他正常日志,找到相同的崩溃线程,先查看Previous Top Crash Logs下面的,因为他可能应该是代表上次和这次崩溃最多的日志
一般情况可以找到的,
如果没有再查看其他带Last Exception Backtrace:的崩溃日志,找到相同的崩溃线程,
多找几个,终于找到了
日志2
Incident Identifier: ****
Hardware Model: iPhone12,1
Process: *** [29121]
Path: /private/var/containers/Bundle/Application/****
Identifier: ****
Version: ***
AppStoreTools: ****
AppVariant: 1:iPhone12,1:13
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: ****** [4252]
Date/Time: 2020-07-27 01:45:21.3428 +0800
Launch Time: 2020-07-27 01:45:20.5947 +0800
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: 1.06.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 29
Last Exception Backtrace:
0 CoreFoundation 0x1b6b88300 __exceptionPreprocess + 228 (NSException.m:199)
1 libobjc.A.dylib 0x1b689cc1c objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x1b6be15a8 _CFThrowFormattedException + 116 (CFObject.m:1994)
3 CoreFoundation 0x1b6beb520 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 52
4 CoreFoundation 0x1b6a6f280 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 260 (NSPlaceholderDictionary.m:0)
5 CoreFoundation 0x1b6a60abc +[NSDictionary dictionaryWithObjects:forKeys:count:] + 60 (NSDictionary.m:604)
6 **自己的*** 0x102fd3f94 +***** + 572
7 **自己的*** 0x102fddee8 -******+ 64
8 **自己的*** 0x102fdd7bc -******+ 64
9 **自己的*** 0x102fccd74 -******* + 40
10 libdispatch.dylib 0x1b682833c _dispatch_client_callout + 20 (object.m:495)
11 libdispatch.dylib 0x1b682aaf8 _dispatch_continuation_pop + 408 (inline_internal.h:2484)
12 libdispatch.dylib 0x1b683b624 _dispatch_source_invoke + 1224 (source.c:568)
13 libdispatch.dylib 0x1b682e72c _dispatch_lane_serial_drain + 264 (inline_internal.h:2525)
14 libdispatch.dylib 0x1b682f290 _dispatch_lane_invoke + 400 (queue.c:3863)
15 libdispatch.dylib 0x1b6838928 _dispatch_workloop_worker_thread + 584 (queue.c:6445)
16 libsystem_pthread.dylib 0x1b688f714 _pthread_wqthread + 276 (pthread.c:2352)
17 libsystem_pthread.dylib 0x1b68959c8 start_wqthread + 8
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001b694c784 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b694bba8 mach_msg + 76 (mach_msg.c:103)
2 CoreFoundation 0x00000001b6b03314 __CFRunLoopServiceMachPort + 152 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b6afe0a0 __CFRunLoopRun + 1156 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b6afd8f4 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
5 GraphicsServices 0x00000001c0f14604 GSEventRunModal + 164 (GSEvent.c:2246)
6 UIKitCore 0x00000001bacd1358 UIApplicationMain + 1944 (UIApplication.m:4823)
7 *******8 0x0000000102dc43ec main + 312
8 libdyld.dylib 0x00000001b69792dc start + 4
。
。
。
Thread 29 name:
Thread 29 Crashed:
0 libsystem_kernel.dylib 0x00000001b696edf0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001b688e930 pthread_kill + 228 (pthread.c:1458)
2 libsystem_c.dylib 0x00000001b681cba4 abort + 104 (abort.c:110)
3 libc++abi.dylib 0x00000001b6941f40 abort_message + 132 (abort_message.cpp:76)
4 libc++abi.dylib 0x00000001b69338c8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:65)
5 libobjc.A.dylib 0x00000001b689cf0c _objc_terminate() + 132 (objc-exception.mm:701)
6 libc++abi.dylib 0x00000001b69413cc std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x00000001b6941358 std::terminate() + 44 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x00000001b6828350 _dispatch_client_callout + 40 (object.m:498)
9 libdispatch.dylib 0x00000001b682aaf8 _dispatch_continuation_pop + 408 (inline_internal.h:2484)
10 libdispatch.dylib 0x00000001b683b624 _dispatch_source_invoke + 1224 (source.c:568)
11 libdispatch.dylib 0x00000001b682e72c _dispatch_lane_serial_drain + 264 (inline_internal.h:2525)
12 libdispatch.dylib 0x00000001b682f290 _dispatch_lane_invoke + 400 (queue.c:3863)
13 libdispatch.dylib 0x00000001b6838928 _dispatch_workloop_worker_thread + 584 (queue.c:6445)
14 libsystem_pthread.dylib 0x00000001b688f714 _pthread_wqthread + 276 (pthread.c:2352)
15 libsystem_pthread.dylib 0x00000001b68959c8 start_wqthread + 8
。
。
。
可以看到日志1的Thread26和日志2的Thread29是一样的,
但日志2包含Last Exception Backtrace: 可以由他找到崩溃的代码解决问题。