gpt4 book ai didi

iPhone SDK/iOS 在 webview/scrollview 中崩溃?

转载 作者:行者123 更新时间:2023-11-29 05:05:31 25 4
gpt4 key购买 nike

我的应用程序发生了非常奇怪的崩溃。它是随机发生的。基本上,我有一个包含多个 UIWebView 的大型 ScrollView ,我从 HTML 字符串加载这些 View 。一段时间后,出现以下崩溃:

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 7 beyond bounds [0 .. 6]'
*** Call stack at first throw:
(
0 CoreFoundation 0x0110dbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f025c2 objc_exception_throw + 47
2 CoreFoundation 0x011036e5 -[__NSArrayM objectAtIndex:] + 261
3 CoreFoundation 0x010866e5 -[NSMutableArray removeObject:range:identical:] + 437
4 CoreFoundation 0x01086520 -[NSMutableArray removeObject:] + 96
5 UIKit 0x0035e7c0 -[UIView(UIViewGestures) removeGestureRecognizer:] + 112
6 UIKit 0x005f85c1 -[UIWebSelectionAssistant setGestureRecognizers] + 58
7 UIKit 0x004b0d09 -[UIWebDocumentView loadHTMLString:baseURL:] + 286
8 CoreFoundation 0x0107e67d __invoking___ + 29
9 CoreFoundation 0x0107e551 -[NSInvocation invoke] + 145
10 WebCore 0x0217f3c3 _ZL15HandleAPISourcePv + 147
11 CoreFoundation 0x010ef01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
12 CoreFoundation 0x0104d28b __CFRunLoopDoSources0 + 571
13 CoreFoundation 0x0104c786 __CFRunLoopRun + 470
14 CoreFoundation 0x0104c240 CFRunLoopRunSpecific + 208
15 CoreFoundation 0x0104c161 CFRunLoopRunInMode + 97
16 WebCore 0x02240423 _ZL12RunWebThreadPv + 499
17 libSystem.B.dylib 0x901ea85d _pthread_start + 345
18 libSystem.B.dylib 0x901ea6e2 thread_start + 34
)
terminate called after throwing an instance of 'NSException'

我真的无法解决这个问题,因为崩溃是随机的,并且似乎是在 CoreFoundation 中,而我无法直接控制它。有什么建议吗?

非常感谢您的帮助!

最佳答案

这并不是您问题的真正答案,但是:请注意,Apple 建议不要将 UIWebViews 放入 UIScrollViews 中。根据我的经验,这当然是可能的,但请注意可能会发生奇怪的事情。

相关问题: Two resizable UIWebViews inside UIScrollView

关于iPhone SDK/iOS 在 webview/scrollview 中崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5437592/

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