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

标签 ios swift iphone

swift - 无法解码堆栈跟踪,如何找到异常发生的位置

有人知道这次崩溃吗?这里的所有信息,我仍然不知道它有什么问题。重要的是我发现很多崩溃都包含这部分, 这是我在这里得到的堆栈跟踪, 堆栈跟踪没有 Controller 名称或行号开头, 它就像一个代码矩阵

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000 at 0x0000000000000000 Crashed Thread: 0

Application Specific Information:
*** 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).'

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
}

how to find where the exception has occurred and how to solve this

最佳答案

你必须检查这一行

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).'

关于ios - Swift- EXC_CRASH (SIGABRT) 如何使用此堆栈跟踪查找异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56003818/

相关文章:

ios - UICollectionView 将 Item 置于中心位置

iOS-UIPageViewController 'Failed to determine navigation direction'

ios - 如何将数据从导航栏上的右键传输到另一个 ViewController?

iphone - 在 iPhone 上播放无限持续时间的声音

ios - 接受信用卡付款以获取计费服务 iOS 应用程序

ios - 在 Objective-C 中使用太多静态变量是一种不好的做法吗?

iphone - 获取包含 UITouch 的所有点

swift - Swift 3 中的多个 NSFetchedResultsControllers

ios - 如何在 Swift 的 TableView 中进行分页?

iphone - 使用段控制优化核心数据获取请求