UIScrollView崩溃

时间:2015-04-15 05:38:30

标签: ios objective-c uiscrollview

有没有人看过这个与scrollview相关的崩溃?我无法重现这一点,但我通过我们的分析工具结构在实时版本中收到了此信息。

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更新,但是没有触及此方法中的scrollview。我预计在一些约束更新之后layoutIfNeeded可能导致了这种情况。但再次无法重现这一点。自上次更新以来,我们在4天内完成了应用程序的12M会话,这发生了1k次,因此绝对不容易再现。

1 个答案:

答案 0 :(得分:1)

尝试以下方法。它对我有用

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

没有多大意义我使用ARC但它对我有用。

同时检查scrollview的superview的视图控制器是否为弱引用。这也可能是一个问题。祝你好运。