2017-02-15 12 views
1

アプリが最近クラッシュしていて、クラッシュログを理解できませんでした。このクラッシュログを理解するにはどうすればよいですか? 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) 

私は背後にある本当の理由が何であるかを理解していませんこのクラッシュ何か案は?

+0

あなたの 'HomeVC'にあなたの' cellForRowAtIndexPath'メソッドが何か間違っているかもしれないと思います。あなたは、セルをインスタンス化する際に、壊れた点を作るべきです、私はこれがアプリケーションがクラッシュする場所だと思います。 –

+0

@StefanStefanovそれは私の最後にクラッシュしていません。私はこのバグを再現することができません、私はそれが古いSDKまたは何かとの関係を持っているかもしれないと思った.. – Zakaria

+0

私はかなりあなたがあなたの細胞をデキューする方法に間違っていると確信しています。おそらくあなたはそれのために廃止された方法を使用していますか? –

答えて

0

セルのデキューには廃止予定のメソッドを使用しています。 dequeueReusableCellWithIdentifier:の代わりにdequeueReusableCellWithIdentifier:forIndexPath:を使用してください。

+0

私はそれが実際に非難されるとは思わない、確かに、新しいメソッドは常にnull以外の値を返すので使いやすいです。特にSwiftでは、forIndexPathバリアントを使用すると、結果がオプションではないので、結果をラップ解除する必要がないため、その違いは重要です。 '' func dequeueReusableCellWithIdentifier(identifier:String) - > UITableViewCell? func dequeueReusableCellWithIdentifier(識別子:String、 forIndexPath indexPath:NSIndexPath) - > UITableViewCell''' –

0

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とデバッグでブレークポイントを置きます。他の行のスタックトレースはappleメソッドに関連しています。

+0

それは私の終わりにクラッシュしていません。私はこのバグを再現することができません、私はそれが古いSDKや何かと関係があるかもしれないと思った(私は9.1 SDKのthoとシミュレータでそれをテストし、それだけでうまくいく).. – Zakaria

0

あなたのセルはゼロかもしれません。

最初に私が提案する、NSZombieをオンにします。

そして、テーブルビューのデータソースとデリゲートをゼロにしてください。

- (void)dealloc { 
    self.tableView.delegate = nil; 
    self.tableView.dataSource = nil; 
    [super dealloc]; 
} 

このヘルプが必要です。

関連する問題