我最近将QuincyKit(位于PLCrashReporter之上的崩溃日志记者)添加到应用程序中,我收到了一个崩溃日志,我在解释时遇到了问题。
崩溃日志似乎不一致 - 它说线程0崩溃了,但是“Last Exception Backtrace”与线程0 callstack不匹配。最后一个异常指向一个表方法,但是线程0 callstack表示在Quincy管理器初始化期间发生了中止。
此外,“Last Exception Backtrace”似乎没有多大意义 - “canEditRowAtIndexPath”方法甚至根本不包含对“removeObjectAtIndex”的调用(参见下面的方法)。
任何人都可以了解我是否应该关注“Last Exception Backtrace”或者是一只红鲱鱼,我应该真正研究为什么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;
}
答案 0 :(得分:0)
如果您使用的是ios7,那可能是UIKit的错 Tableview希望在dealloc之前调用delegate方法 因此,您可以在Custom类中添加此代码:
- (void )dealloc{
self.tableView.dataSource = nil;
self.tableView.delegate = nil;
}
中查看详情