[关闭]
@buoge 2017-06-01T15:07:58.000000Z 字数 917 阅读 1285

UIScrollView _getDelegateZoomView bug 经历

iOS


[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

  1. 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 强引用同样会产生此类问题

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注