gpt4 book ai didi

ios - UIWebview:WebThread EXC_BAD_ACCESS

转载 作者:可可西里 更新时间:2023-11-01 03:28:25 26 4
gpt4 key购买 nike

我有一个非常简单的应用程序:使用 http://tv2.dk 显示 WebView

我正在使用 Storyboard,添加了 WebView 并在我的 Controller 上设置了一个属性。为了简单起见,我没有设置委托(delegate)。

在 viewDidLoad 中,我使用要加载的 url 调用 web View

[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://tv2.dk"]]];

应用程序每次启动时都会由于网络线程工作程序中的某些错误而崩溃,请参阅此转储。

libobjc.A.dylib`objc_msgSend:
0x1954f7bc0: cmp x0, #0
0x1954f7bc4: b.le 0x1954f7c30 ; objc_msgSend + 112
0x1954f7bc8: ldr x13, [x0]
0x1954f7bcc: and x9, x13, #0x1fffffff8
0x1954f7bd0: ldp x10, x11, [x9, #16]
0x1954f7bd4: and w12, w1, w11
0x1954f7bd8: add x12, x10, x12, lsl #4
0x1954f7bdc: ldp x16, x17, [x12]
0x1954f7be0: cmp x16, x1
0x1954f7be4: b.ne 0x1954f7bec ; objc_msgSend + 44
0x1954f7be8: br x17
0x1954f7bec: cbz x16, 0x1954f7d80 ; _objc_msgSend_uncached_impcache
0x1954f7bf0: cmp x12, x10
0x1954f7bf4: b.eq 0x1954f7c00 ; objc_msgSend + 64
0x1954f7bf8: ldp x16, x17, [x12, #-16]!
0x1954f7bfc: b 0x1954f7be0 ; objc_msgSend + 32
0x1954f7c00: add x12, x12, w11, uxtw #4
0x1954f7c04: ldp x16, x17, [x12]
0x1954f7c08: cmp x16, x1
0x1954f7c0c: b.ne 0x1954f7c14 ; objc_msgSend + 84
0x1954f7c10: br x17
0x1954f7c14: cbz x16, 0x1954f7d80 ; _objc_msgSend_uncached_impcache
0x1954f7c18: cmp x12, x10
0x1954f7c1c: b.eq 0x1954f7c28 ; objc_msgSend + 104
0x1954f7c20: ldp x16, x17, [x12, #-16]!
0x1954f7c24: b 0x1954f7c08 ; objc_msgSend + 72
0x1954f7c28: mov x2, x9
0x1954f7c2c: b 0x1954e1e70 ; objc_msgSend_corrupt_cache_error
0x1954f7c30: b.eq 0x1954f7c48 ; objc_msgSend + 136
0x1954f7c34: adrp x10, 18278
0x1954f7c38: add x10, x10, #1904
0x1954f7c3c: lsr x11, x0, #60
0x1954f7c40: ldr x9, [x10, x11, lsl #3]
0x1954f7c44: b 0x1954f7bd0 ; objc_msgSend + 16
0x1954f7c48: movz x1, #0
0x1954f7c4c: movi d0, #0000000000000000
0x1954f7c50: movi d1, #0000000000000000
0x1954f7c54: movi d2, #0000000000000000
0x1954f7c58: movi d3, #0000000000000000
0x1954f7c5c: ret

违规行

0x1954f7bd0:  ldp    x10, x11, [x9, #16]

在这里查看完整的源代码:https://bitbucket.org/styrken/ios-webview-crash

我试过在多个设备等上运行这段代码,但都崩溃了。

最佳答案

来自@RasmusStyrk 上面的评论

I have found out that with using NSZombie's, i got the following crash message: WebviewCrash[4598:956679] *** -[UIViewAnimationState release]: message sent to deallocated instance 0x1707c5370. To fix this i had to turn off animations in UIVIew using [UIView setAnimationsEnabled:NO]; and now it works. It seems like a bug in iOS8. –

我们也遇到过它会随机崩溃的情况,设置 [UIView setAnimationsEnabled:NO] 是唯一可以完全缓解此问题的方法!

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

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