Swift- EXC_CRASH(SIGABRT)如何使用此堆栈跟踪查找异常

时间:2019-05-06 10:59:34

标签: ios swift iphone

快速-无法解码堆栈跟踪,如何找到异常发生的地方

有人知道这次车祸吗?所有这里的信息,我仍然不知道这是怎么回事。重要的是我发现很多崩溃都包含这部分, 这是我在这里得到的堆栈跟踪, 堆栈跟踪没有开头的控制器名称或行号, 就像代码矩阵

  

异常类型:EXC_CRASH(SIGABRT)       异常代码:0x00000000 at 0x0000000000000000       损坏的线程:0

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid
     

第0节中的行数。   更新(51)之后的现有部分必须等于   更新前该部分中包含的行(50),正负   从该部分插入或删除的行数(已插入0,   0已删除),加上或减去移入或移出的行数   该部分(移入0,移出0)。

Thread 0 Crashed:
0 CoreFoundation 0x000000021ecd5ea4 0x21ebb9000 + 1167012
1 libobjc.A.dylib 0x000000021dea5a50 objc_exception_throw + 56
2 CoreFoundation 0x000000021ebeba2c 0x21ebb9000 + 207404
3 Foundation 0x000000021f6da1d0 0x21f64e000 + 573904
4 UIKitCore 0x000000024c068268 0x24b58c000 + 11387496
5 UIKitCore 0x000000024c0805b4 0x24b58c000 + 11486644
6 UIKitCore 0x000000024c0806c0 0x24b58c000 + 11486912
7 DCMobileApp 0x0000000100771d08 0x100724000 + 318728
8 DCMobileApp 0x00000001007a84ac 0x100724000 + 541868
9 DCMobileApp 0x0000000100790a54 0x100724000 + 445012
10 DCMobileApp 0x000000010087cdc8 0x100724000 + 1412552
11 DCMobileApp 0x000000010097b12c 0x100724000 + 2453804
12 DCMobileApp 0x00000001007d7818 0x100724000 + 735256
13 libdispatch.dylib 0x000000021e70d6c8 0x21e6ad000 + 394952
14 libdispatch.dylib 0x000000021e70e484 0x21e6ad000 + 398468
15 libdispatch.dylib 0x000000021e6ba9a4 0x21e6ad000 + 55716
16 CoreFoundation 0x000000021ec65ce4 0x21ebb9000 + 707812
17 CoreFoundation 0x000000021ec60bac 0x21ebb9000 + 687020
18 CoreFoundation 0x000000021ec600e0 CFRunLoopRunSpecific + 436
19 GraphicsServices 0x0000000220ed9584 GSEventRunModal + 100
20 UIKitCore 0x000000024be74c00 UIApplicationMain + 212
21 DCMobileApp 0x0000000100731a50 0x100724000 + 55888
22 libdyld.dylib 0x000000021e71ebb4 0x21e71e000 + 2996

Thread 1:
0 libsystem_kernel.dylib 0x000000021e86bb9c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000021e8f11c0 _pthread_wqthread + 540

Thread 2:
0 libsystem_kernel.dylib 0x000000021e85fea4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000021e85f37c mach_msg + 72
2 CoreFoundation 0x000000021ec65ad8 0x21ebb9000 + 707288
3 CoreFoundation 0x000000021ec60974 0x21ebb9000 + 686452
4 CoreFoundation 0x000000021ec600e0 CFRunLoopRunSpecific + 436
5 Foundation 0x000000021f656494 0x21f64e000 + 33940
6 Foundation 0x000000021f656340 0x21f64e000 + 33600
7 UIKitCore 0x000000024bf650c4 0x24b58c000 + 10326212
8 Foundation 0x000000021f78923c 0x21f64e000 + 1290812
9 libsystem_pthread.dylib 0x000000021e8f025c 0x21e8e5000 + 45660
10 libsystem_pthread.dylib 0x000000021e8f01bc _pthread_start + 48

Thread 3:
0 libsystem_kernel.dylib 0x000000021e85fea4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000021e85f37c mach_msg + 72
2 libsystem_kernel.dylib 0x000000021e85b4ec thread_suspend + 84
3 JAnalytics 0x0000000100dc59e0 kscm_machexception_getAPI + 984
4 libsystem_pthread.dylib 0x000000021e8f025c 0x21e8e5000 + 45660
5 libsystem_pthread.dylib 0x000000021e8f01bc _pthread_start + 48

Thread 4:
0 libsystem_kernel.dylib 0x000000021e85fea4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000021e85f37c mach_msg + 72
2 JAnalytics 0x0000000100dc5a0c kscm_machexception_getAPI + 1028
3 libsystem_pthread.dylib 0x000000021e8f025c 0x21e8e5000 + 45660
4 libsystem_pthread.dylib 0x000000021e8f01bc _pthread_start + 48

Thread 5:
0 libsystem_kernel.dylib 0x000000021e85fea4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000021e85f37c mach_msg + 72
2 CoreFoundation 0x000000021ec65ad8 0x21ebb9000 + 707288
3 CoreFoundation 0x000000021ec60974 0x21ebb9000 + 686452
4 CoreFoundation 0x000000021ec600e0 CFRunLoopRunSpecific + 436
5 CFNetwork 0x000000021f28300c 0x21f281000 + 8204
6 Foundation 0x000000021f78923c 0x21f64e000 + 1290812
7 libsystem_pthread.dylib 0x000000021e8f025c 0x21e8e5000 + 45660
8 libsystem_pthread.dylib 0x000000021e8f01bc _pthread_start + 48

Thread 6:
0 libsystem_pthread.dylib 0x000000021e8f3ce8 0x21e8e5000 + 60648

Thread 7:
0 libsystem_pthread.dylib 0x000000021e8f3ce8 0x21e8e5000 + 60648

Thread 8:
0 libsystem_pthread.dylib 0x000000021e8f3ce8 0x21e8e5000 + 60648

Thread 0 crashed with ARM-64 Thread State:

Binary Images:

Extra Information:

Notable Addresses:
{}

Application Stats:
{
"active_time_since_last_crash": 0,
"active_time_since_launch": 0,
"application_active": false,
"application_in_foreground": true,
"background_time_since_last_crash": 0,
"background_time_since_launch": 0,
"launches_since_last_crash": 16,
"sessions_since_last_crash": 16,
"sessions_since_launch": 1
}
     

如何查找发生异常的位置以及如何解决

1 个答案:

答案 0 :(得分:1)

您必须检查此行

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (51) must be equal to the number of rows contained in that section before the update (50), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'