gpt4 book ai didi

ios 崩溃问题 - EXC_BAD_ACCESS

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:54:27 25 4
gpt4 key购买 nike

我从 Crashlytics 收到了这条错误消息。

异常类型:EXC_BAD_ACCESS 代码:0xd000000c 处的 KERN_INVALID_ADDRESS

Thread 0: Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3b283b26 objc_msgSend + 5
1 TestApp 0x0012b239 -[EasyTableView scrollViewDidScroll:] (EasyTableView.m:291)
2 UIKit 0x339f006d -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 64
3 UIKit 0x3376d375 -[UIScrollView setContentOffset:] + 596
4 UIKit 0x3381b005 -[UITableView setContentOffset:] + 320
5 UIKit 0x3376d0e7 -[UIScrollView _adjustContentOffsetIfNecessary] + 1354
6 UIKit 0x33820773 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 414
7 UIKit 0x338205cb -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 30
8 UIKit 0x33820587 -[UIScrollView removeFromSuperview] + 30
9 UIKit 0x3374e687 -[UIView dealloc] + 366
10 liboainject.dylib 0x002d86cd ___swapMethods_block_invoke_4
11 UIKit 0x3374e687 -[UIView dealloc] + 366
12 liboainject.dylib 0x002d86cd ___swapMethods_block_invoke_4
13 UIKit 0x3374e687 -[UIView dealloc] + 366
14 liboainject.dylib 0x002d86cd ___swapMethods_block_invoke_4
15 libobjc.A.dylib 0x3b285007 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 358
16 liboainject.dylib 0x002d7d33 __oa__objc_autoreleasePoolPop
17 CoreFoundation 0x30f10a41 _CFAutoreleasePoolPop + 16
18 UIKit 0x337464cd _wrapRunLoopWithAutoreleasePoolHandler + 36
19 CoreFoundation 0x30fa81d5 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
20 CoreFoundation 0x30fa5b79 __CFRunLoopDoObservers + 284
21 CoreFoundation 0x30fa5ebb __CFRunLoopRun + 730
22 CoreFoundation 0x30f10ce7 CFRunLoopRunSpecific + 522
23 CoreFoundation 0x30f10acb CFRunLoopRunInMode + 106
24 GraphicsServices 0x35bfa283 GSEventRunModal + 138
25 UIKit 0x337b2a41 UIApplicationMain + 1136
26 TestApp 0x000ea19d main (main.m:16)

我的代码(EasyTableView.m: 291)如下

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if ([delegate respondsToSelector:@selector(easyTableView:scrolledToOffset:)])
[delegate easyTableView:self scrolledToOffset:self.contentOffset];
}

- (CGPoint)contentOffset {
CGPoint offset = self.tableView.contentOffset;

if (_orientation == EasyTableViewOrientationHorizontal)
offset = CGPointMake(offset.y, offset.x);

return offset;
}


- (void)setContentOffset:(CGPoint)offset {
if (_orientation == EasyTableViewOrientationHorizontal)
self.tableView.contentOffset = CGPointMake(offset.y, offset.x);
else
self.tableView.contentOffset = offset;
}

我尝试使用 Zombie 进行调试并调查了仪器的泄漏。但我找不到任何东西。我该如何解决这个问题?提前致谢

最佳答案

您应该清除 dealloc 中的 scrollViewtableView 委托(delegate)

关于ios 崩溃问题 - EXC_BAD_ACCESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20251344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com