如何理解这个崩溃日志? SIGSEGV

How to understand this crash log? SIGSEGV

该应用最近崩溃了,我没能理解崩溃日志。

崩溃仅在 iPhone 5s SDK:9.1 发生,我无法在模拟器或具有其他 SDK 版本的其他设备上重现它..

Crashed Thread: 0
0   libobjc.A.dylib                     0x1993b5bdc objc_msgSend (in libobjc.A.dylib) + 28
1   UIKit                               0x18a45bfb4 -[UINibStringIDTable lookupKey:identifier:] (in UIKit) + 132
2   UIKit                               0x18a457c04 -[UINibDecoder decodeObjectForKey:] (in UIKit) + 48
3   UIKit                               0x18a339030 -[UINib instantiateWithOwner:options:] (in UIKit) + 1416
4   UIKit                               0x189fc01b8 -[UITableView _dequeueReusableViewOfType:withIdentifier:] (in UIKit) + 552
5   MyApp                               0x10028a160 -[HomeVC loadStandardContentCellOnTableView:cellForRowAtIndexPath:] (in MyApp) (HomeVC.m:1604)
6   MyApp                               0x10028737c -[HomeVC tableView:cellForRowAtIndexPath:] (in MyApp) (HomeVC.m:1198)
7   UIKit                               0x18a1c220c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] (in UIKit) + 688
8   UIKit                               0x18a1c2364 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] (in UIKit) + 80
9   UIKit                               0x18a1b17b8 -[UITableView _updateVisibleCellsNow:isRecursive:] (in UIKit) + 2440
10  UIKit                               0x18a1c6f0c -[UITableView _performWithCachedTraitCollection:] (in UIKit) + 104
11  UIKit                               0x189f5f22c -[UITableView layoutSubviews] (in UIKit) + 176
12  UIKit                               0x189e6f7ac -[UIView(CALayerDelegate) layoutSublayersOfLayer:] (in UIKit) + 644
13  QuartzCore                          0x18966eb58 -[CALayer layoutSublayers] (in QuartzCore) + 148
14  QuartzCore                          0x189669764 CA::Layer::layout_if_needed(CA::Transaction*) (in QuartzCore) + 292
15  UIKit                               0x189e862fc -[UIView(Hierarchy) layoutBelowIfNeeded] (in UIKit) + 884
16  UIKit                               0x189f339e4 -[UINavigationController _layoutViewController:] (in UIKit) + 1196
17  UIKit                               0x189f313bc -[UINavigationController _layoutTopViewController] (in UIKit) + 228
18  UIKit                               0x189f49fb4 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] (in UIKit) + 728
19  UIKit                               0x189f49ca0 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] (in UIKit) + 416
20  UIKit                               0x189f499a8 -[UINavigationTransitionView _cleanupTransition] (in UIKit) + 744
21  UIKit                               0x189eaed3c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] (in UIKit) + 312
22  UIKit                               0x189eacfb8 +[UIViewAnimationState popAnimationState] (in UIKit) + 324
23  UIKit                               0x189f3d4c4 -[UINavigationTransitionView transition:fromView:toView:] (in UIKit) + 1792
24  UIKit                               0x189f33098 -[UINavigationController _startTransition:fromViewController:toViewController:] (in UIKit) + 2696
25  UIKit                               0x189f32244 -[UINavigationController _startDeferredTransitionIfNeeded:] (in UIKit) + 868
26  UIKit                               0x189f31e6c -[UINavigationController __viewWillLayoutSubviews] (in UIKit) + 60
27  UIKit                               0x189f31dd4 -[UILayoutContainerView layoutSubviews] (in UIKit) + 208
28  UIKit                               0x189e6f7ac -[UIView(CALayerDelegate) layoutSublayersOfLayer:] (in UIKit) + 644
29  QuartzCore                          0x18966eb58 -[CALayer layoutSublayers] (in QuartzCore) + 148
30  QuartzCore                          0x189669764 CA::Layer::layout_if_needed(CA::Transaction*) (in QuartzCore) + 292
31  QuartzCore                          0x189669624 CA::Layer::layout_and_display_if_needed(CA::Transaction*) (in QuartzCore) + 32
32  QuartzCore                          0x189668cc0 CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore) + 252
33  QuartzCore                          0x189668a08 CA::Transaction::commit() (in QuartzCore) + 512
34  QuartzCore                          0x1896620f8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) (in QuartzCore) + 80
35  CoreFoundation                      0x184897bd0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) + 32
36  CoreFoundation                      0x184895974 __CFRunLoopDoObservers (in CoreFoundation) + 372
37  CoreFoundation                      0x184895da4 __CFRunLoopRun (in CoreFoundation) + 928
38  CoreFoundation                      0x1847c4ca0 CFRunLoopRunSpecific (in CoreFoundation) + 384
39  GraphicsServices                    0x18fa00088 GSEventRunModal (in GraphicsServices) + 180
40  UIKit                               0x189edcffc UIApplicationMain (in UIKit) + 204
41  MyApp                               0x100272ea4 main (in MyApp) (main.m:47)

我不明白这次崩溃背后的真正原因是什么。有什么想法吗?

SIGSEGV:- 这是一个分段错误。更多详情请见 SegmentationFault

以下这些方法存在问题:-

5 MyApp 0x10028a160 -[HomeVC loadStandardContentCellOnTableView:cellForRowAtIndexPath:] (in MyApp) (HomeVC.m:1604) 6 MyApp 0x10028737c -[HomeVC tableView:cellForRowAtIndexPath:] (in MyApp) (HomeVC.m:1198)

在loadStandardContentCellOnTableView中设置断点并调试。其他行的堆栈跟踪与苹果方法有关。

您正在使用一种已弃用的方法来使您的单元格出队。而不是使用 dequeueReusableCellWithIdentifier: 你应该使用 dequeueReusableCellWithIdentifier:forIndexPath:.