我在用户构建中发生了崩溃,我最终无法重现。找出导致这种情况的原因的最佳方法是什么?
具体来说,如果我想 NSLog 或捕获异常,我应该在哪里执行此操作(基于下面的崩溃日志)?注意:tableview 使用自定义 UITableViewCell。
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x361db88f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x37430259 objc_exception_throw + 33
2 CoreFoundation 0x361db789 +[NSException raise:format:] + 1
3 Foundation 0x375fd3a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91
4 UIKit 0x30eb1163 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 739
5 UIKit 0x30eb0181 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1077
6 UIKit 0x30eaf90b -[UITableView layoutSubviews] + 207
7 UIKit 0x30e540df -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 183
8 CoreFoundation 0x3613a1fb -[NSObject performSelector:withObject:] + 43
9 QuartzCore 0x37f26aa5 -[CALayer layoutSublayers] + 217
10 QuartzCore 0x37f266bd CA::Layer::layout_if_needed(CA::Transaction*) + 217
11 QuartzCore 0x37f2a843 CA::Context::commit_transaction(CA::Transaction*) + 227
12 QuartzCore 0x37f2a57f CA::Transaction::commit() + 315
13 QuartzCore 0x37f224b9 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 57
14 CoreFoundation 0x361afb1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 19
15 CoreFoundation 0x361add57 __CFRunLoopDoObservers + 259
16 CoreFoundation 0x361ae0b1 __CFRunLoopRun + 761
17 CoreFoundation 0x361314a5 CFRunLoopRunSpecific + 301
18 CoreFoundation 0x3613136d CFRunLoopRunInMode + 105
19 GraphicsServices 0x324f1439 GSEventRunModal + 137
20 UIKit 0x30e7ee7d UIApplicationMain + 1081