需要帮助解释来自 QuincyKit 的崩溃日志
Posted
技术标签:
【中文标题】需要帮助解释来自 QuincyKit 的崩溃日志【英文标题】:Need help interpreting a crash log from QuincyKit 【发布时间】:2015-04-25 16:44:38 【问题描述】:我最近将 QuincyKit(位于 PLCrashReporter 之上的崩溃日志报告器)添加到一个应用程序中,但我收到了一个我无法解释的崩溃日志。
崩溃日志似乎不一致 - 它说是线程 0 崩溃了,但“最后异常回溯”与线程 0 调用堆栈不匹配。最后一个异常指向一个表方法,但线程 0 调用堆栈表明 Quincy 管理器初始化期间发生了中止。
此外,“Last Exception Backtrace”本身似乎没有多大意义——“canEditRowAtIndexPath”方法甚至根本不包括对“removeObjectAtIndex”的调用(方法见下文)。
谁能阐明我是否应该关注“最后一个异常回溯”或者这是一个红鲱鱼,我真的应该研究为什么 PLCrashReporter 在启动期间中止?
非常感谢
崩溃日志摘录:
Exception Type: SIGABRT
Exception Codes: #0 at 0x38362df0
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 7 beyond bounds [0 .. 6]'
Last Exception Backtrace:
0 CoreFoundation 0x29920fef <redacted> + 126
1 libobjc.A.dylib 0x37d0cc8b objc_exception_throw + 38
2 CoreFoundation 0x29833821 -[__NSArrayM removeObjectAtIndex:] + 0
3 DART 0x000906b3 -[DeliveryComplete tableView:canEditRowAtIndexPath:] + 262
4 UIKit 0x2d0a3c25 -[UITableView _canEditRowAtIndexPath:] + 60
5 UIKit 0x2d0a3a7f -[UITableView _setupCell:forEditing:atIndexPath:animated:updateSeparators:] + 130
6 UIKit 0x2d0a1179 <redacted> + 2320
7 UIKit 0x2cf82a31 +[UIView performWithoutAnimation:] + 72
8 UIKit 0x2d0a0861 -[UITableView _configureCellForDisplay:forIndexPath:] + 336
9 UIKit 0x2d246383 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 498
10 UIKit 0x2d24642f -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 54
11 UIKit 0x2d23b013 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2258
12 UIKit 0x2d049657 -[UITableView layoutSubviews] + 186
13 UIKit 0x2cf73023 -[UIView layoutSublayersOfLayer:] + 546
14 QuartzCore 0x2c993d99 -[CALayer layoutSublayers] + 128
15 QuartzCore 0x2c98f5cd <redacted> + 360
16 QuartzCore 0x2c98f455 <redacted> + 16
17 QuartzCore 0x2c98edf1 <redacted> + 224
18 QuartzCore 0x2c98ebdf <redacted> + 434
19 UIKit 0x2cf6b23b <redacted> + 126
20 CoreFoundation 0x298e6fed <redacted> + 20
21 CoreFoundation 0x298e46ab <redacted> + 278
22 CoreFoundation 0x298e4ab3 <redacted> + 914
23 CoreFoundation 0x29831201 CFRunLoopRunSpecific + 476
24 CoreFoundation 0x29831013 CFRunLoopRunInMode + 106
25 GraphicsServices 0x3100d201 GSEventRunModal + 136
26 UIKit 0x2cfd5a59 UIApplicationMain + 1440
27 DART 0x00015491 _mh_execute_header + 25745
28 libdyld.dylib 0x38298aaf <redacted> + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x38362df0 __pthread_kill + 8
1 libsystem_c.dylib 0x382fe909 abort + 76
2 DART 0x00122dd7 -[PLCrashReporter enableCrashReporterAndReturnError:] + 1294
3 CoreFoundation 0x2992131f <redacted> + 630
4 libobjc.A.dylib 0x37d0cf13 <redacted> + 174
5 libc++abi.dylib 0x37643de3 <redacted> + 78
6 libc++abi.dylib 0x376438af __cxa_rethrow + 102
7 libobjc.A.dylib 0x37d0cdd3 objc_exception_rethrow + 42
8 CoreFoundation 0x2983129d CFRunLoopRunSpecific + 632
9 CoreFoundation 0x29831013 CFRunLoopRunInMode + 106
10 GraphicsServices 0x3100d201 GSEventRunModal + 136
11 UIKit 0x2cfd5a59 UIApplicationMain + 1440
12 DART 0x00015491 _mh_execute_header + 25745
13 libdyld.dylib 0x38298aaf <redacted> + 2
“canEditRowAtIndexPath”方法:
-(BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
if (tableView.tag == SIGNER_TABLE_TAG_VALUE)
RouteStopData *currentStop = [CurrentRoute singleton].selectedStop;
NSArray *signers = [currentStop signerNamesForStop];
if (indexPath.row >= [signers count])
return NO;
if ([[signers objectAtIndex:indexPath.row] isEqualToString:DARK_DROP_SIGNER_STRING] ||
[[signers objectAtIndex:indexPath.row] isEqualToString:PAPER_INVOICE_SIGNER_STRING] ||
[[signers objectAtIndex:indexPath.row] isEqualToString:ADD_NEW_SIGNER_STRING]
)
return NO;
return YES;
return NO;
【问题讨论】:
【参考方案1】:如果你使用的是 ios7,那可能是 UIKit 的问题。 Tableview 想在 dealloc 之前调用委托方法。 因此,您可以在自定义类中添加此代码:
- (void )dealloc
self.tableView.dataSource = nil;
self.tableView.delegate = nil;
在iOS 7 bug or my bug in UIAlertView中查看更多信息
【讨论】:
以上是关于需要帮助解释来自 QuincyKit 的崩溃日志的主要内容,如果未能解决你的问题,请参考以下文章
如何符号化来自 Xamarin Forms iOS 项目的崩溃/错误日志?