2015-04-15 60 views
2

有沒有人看到這個滾動視圖相關的崩潰?我無法重現這一點,但我已通過分析工具結構在實時構建中收到此信息。UIScrollView崩潰

Thread : Crashed: com.apple.main-thread 
0 libobjc.A.dylib    0x0000000192e9bbd0 objc_msgSend + 16 
1 UIKit       0x000000018670f608 -[UIScrollView _getDelegateZoomView] + 80 
2 UIKit       0x000000018699531c -[UIScrollView _offsetForCenterOfPossibleZoomView:withIncomingBoundsSize:] + 64 
3 UIKit       0x0000000186d81f34 -[UIView(AdditionalLayoutSupport) _nsis_center:bounds:inEngine:] + 1208 
4 UIKit       0x00000001867bc9d8 -[UIView(Geometry) _applyISEngineLayoutValues] + 160 
5 UIKit       0x00000001866d6554 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 276 
6 UIKit       0x00000001866d1b18 -[UIView(Hierarchy) layoutBelowIfNeeded] + 712 
7 MyAppDetailCell    0x00000001000f29e0 -[MyAppDetailCell displayDataDelayed:] (MyAppDetailCell.m:139) 
8 Foundation      0x0000000182d9cba4 __NSFireDelayedPerform + 424 
9 CoreFoundation     0x0000000181e6ac20 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28 
10 CoreFoundation     0x0000000181e6a8d0 __CFRunLoopDoTimer + 888 
11 CoreFoundation     0x0000000181e6831c __CFRunLoopRun + 1372 
12 CoreFoundation     0x0000000181d951f4 CFRunLoopRunSpecific + 396 
13 GraphicsServices    0x000000018b1b76fc GSEventRunModal + 168 
14 UIKit       0x000000018672610c UIApplicationMain + 1488 
15 MyApp       0x00000001000f66f4 main (main.m:16) 
16 libdyld.dylib     0x0000000193506a08 start + 4 

由於公司政策,我無法在此處上傳代碼。我正在做一些動畫(SpriteKit),修改了一些約束,主要是在那個displayDataDelayed方法中做UI更新,但沒有觸及這個方法中的滾動視圖。我預計在一些約束更新可能導致此問題後,layoutIfNeeded。但是再次無法重現這一點。自從上次更新4天后,我們有12M的應用程序會話,發生了1k次,因此絕對不容易重現。

+1

用相關代碼(包含MyAppDetailCell.m行139的方法)更新您的問題。 – rmaddy

+0

添加有關崩潰發生的相互作用的詳細信息。 當您導航到另一個視圖時它崩潰嗎? – Samir

+0

@Abhinav請簡要解釋問題並提供您的代碼。 –

回答

1

請嘗試以下操作。它爲我工作

self.scrollView.delegate = nil; 
self.scrollView = nil; 

沒有多少意義我使用ARC,但它爲我工作。

另外檢查scrollview的超級視圖的視圖控制器是否是弱引用。這也可能是一個問題。祝你好運。

+0

我不這麼認爲,因此,委託處理已經在dealloc中完成了。 :( –

+0

然後爲殭屍進行配置是最後的手段。殭屍配置文件,讓它崩潰,然後會彈出一個小箭頭,擊中它將帶你到堆棧,你可以看到什麼被釋放。 – Avi

相關問題