2

我无法使用 UIScrollView 诊断崩溃

UIKit
-[UIScrollView setContentOffset:]

异常类型:EXC_BAD_ACCESS0xe0000008KERN_INVALID_ADDRESS处的代码

com.apple.main-thread Crashed
0    libobjc.A.dylib     objc_msgSend + 15
1    UIKit   -[UIScrollView setContentOffset:] + 618
2    UIKit   -[UITableView setContentOffset:] + 330
3    UIKit   -[UIScrollView(Static) _adjustContentOffsetIfNecessary] + 1474
4    UIKit   -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 414
5    UIKit   -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 30
6    UIKit   -[UIScrollView removeFromSuperview] + 30
7 ...    UIKit   -[UIView dealloc] + 296
8    UIKit   -[UIView dealloc] + 296
9    libobjc.A.dylib     (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 168
10   CoreFoundation  _CFAutoreleasePoolPop + 16
11   CoreFoundation  __CFRunLoopRun + 1296
12   CoreFoundation  CFRunLoopRunSpecific + 356
13   CoreFoundation  CFRunLoopRunInMode + 104
14   GraphicsServices    GSEventRunModal + 74
15   UIKit   UIApplicationMain + 1120
16   iTV Shows  main.m line 12
4

2 回答 2

1

我有同样的问题。在方法中将TableViewandScrollView委托(或您可能拥有的任何其他委托)设置为 nildealloc解决了这个问题。

- (void)dealloc {
    self.tableView.delegate = nil;
    self.tableView.dataSource = nil;
}
于 2014-10-09T21:52:17.947 回答
0

不看代码就很难给出具体答案,但iOS Debugging Magic技术说明始终是一个很好的资源,其中包含调试崩溃的提示。

技术说明 TN2239:iOS 调试魔法

于 2013-04-03T08:14:51.793 回答