UIScrollView _getDelegateZoomView bug 经历


[UIScrollView _getDelegateZoomView]
UIKit -[UIScrollView_offsetForCenterOfPossibleZoomView:withIncomingBoundsSize:] + 64

bugly 腾讯给出的解释

闪退场景一:recorder deleteRecording 之前 先判断文件是否存在,否则会造成过度释放,解决方法:

if ([[NSFileManager defaultManager] fileExistsAtPath:self.recorder.url.path]) {
if (![self.recorder deleteRecording])
NSLog(@"Failed to delete %@", self.recorder.url);
}

闪退场景二: delegate = nil 。
将XXViewContrller设置为delegate时,当页面发生跳转时,XXViewController的对象会被释放,这是代码走到[_delegate callbackMethod],便出现crash。解决方法有二:1.将@property (nonatomic ,assign) id delegate; 中 assign关键字改为weak。 2.在XXViewController的delloc方法中添加:xxx.delegate = nil;

http://www.cnblogs.com/smileEvday/p/iOSCrash.html

Perfect, an exact replica of the crash report, so now I know with confidence that the problem is that theARArtworkViewControlleris released by the time that method is called.

问题的方向是对的,都是vc提前释放,然后野指针的问题引起,
block 强引用同样会产生此类问题

posted @ 2018-07-20 20:24  buoge  阅读(313)  评论(0编辑  收藏  举报