问题描述
我在试图解决这个问题时遇到了麻烦,因为无论我做什么来解决我的问题,我都会遇到这个崩溃
这里有痕迹
$0 = 0x1f8f9a10 (0 ???0x02b04144 0x0 + 45105476,1 TheAppName 0x001016e0 start + 0,2 基金会 0x34334599 + 72,3 网络核心 0x399e7bfb + 82,4 UIKit 0x3595b493 + 182,5 UIKit 0x358d7d1f + 382,6 UIKit 0x358d7d33 + 402,7 UIKit 0x358d7d33 + 402,8 UIKit 0x358d7431 + 360,9 UIKit 0x358d72c3 + 30,10 UIKit 0x35ce2fef + 386,11 UIKit 0x35ce3879 + 464,12 UIKit 0x35ce63d3 + 698,13 UIKit 0x35ce5e49 + 552,14 UIKit 0x35ce28dd + 172,15 UIKit 0x358d8803 + 258,16 石英核心 0x35682d8b + 214,17 石英核心 0x35682929 + 460,18 石英核心 0x3568385d + 16,19 石英核心 0x35683243 + 238,20 石英核心 0x35683051 + 316,21 石英核心 0x356ba0f7 + 254,22 石英核心 0x356b9ff1 + 64,23 IOMobileFramebuffer 0x37915fd7 + 154,24 IOKit 0x346b4449 IODispatchCalloutFromCFMessage + 192,25 核心基金会 0x33a975db + 118,26 核心基金会 0x33aa2173 + 34,27 核心基金会 0x33aa2117 + 138,28 核心基金会 0x33aa0f99 + 1384,29 核心基金会 0x33a13ebd CFRunLoopRunSpecific + 356,30 核心基金会 0x33a13d49 CFRunLoopRunInMode + 104,31 图形服务 0x375ca2eb GSEventRunModal + 74,32 UIKit 0x35929301 UIApplicationMain + 1120,33 应用名称 0x001332d9 主 + 116,34 应用名称 0x00101708 开始 + 40)
我正在做的是使用 UIPageViewController 作为幻灯片.有时,当页面转动时,我需要加载带有 Web 视图的 HTML 文件,这些 html 文件包含用于为 html 页面中的对象设置动画的 html 代码.所以每次我创建一个新的视图控制器以显示在 pageViewController 中时,我都需要销毁 webview,因为从一个动画到另一个动画时,aniamtion 不会动画.有时它有效,但有时会导致此崩溃.现在我不知道如何阅读这个,因为 webviews 没有像这条消息那样详细记录.那么有人知道这里到底发生了什么吗??
代码崩溃时吐出
WebCore`WebCore::Page::setDeviceScaleFactor(float):0x399edbc0:推{r4,r5,r7,lr}0x399edbc2: mov r4, r00x399edbc4:vmov d0、r1、r10x399edbc8: vldr s2, [r4, #100]0x399edbcc:添加 r7、sp、#80x399edbce: vcmpe.f32s2, s00x399edbd2:vmrs APSR_nzcv,fpscr0x399edbd6:它均衡0x399edbd8: popeq {r4, r5, r7, pc}0x399edbda:vstr s0,[r4,#100]0x399edbde:ldr r5,[r4,#56]0x399edbe0:cbz r5,0x399edc22;WebCore::Page::setDeviceScaleFactor(float) + 980x399edbe2: ldr.w r0, [r5, #804]0x399edbe6:movs r1,#10x399edbe8:bl 0x39a3c3c0;WebCore::Document::styleResolverChanged(WebCore::StyleResolverUpdateFlag)0x399edbec: add.w r0, r5, #280x399edbf0:movs r1,#00x399edbf2:bl 0x399f9ed0;WebCore::FrameTree::traverseNext(WebCore::Frame const*) const0x399edbf6: mov r5, r00x399edbf8:cmp r5,#00x399edbfa:bne 0x399edbe2;WebCore::Page::setDeviceScaleFactor(float) + 340x399edbfc:ldr r0,[r4,#56]0x399edbfe:cmp r0,#00x399edc00:beq 0x399edc22;WebCore::Page::setDeviceScaleFactor(float) + 980x399edc02:bl 0x39dee4f4;WebCore::Frame::deviceOrPageScaleFactorChanged()0x399edc06:ldr r5,[r4,#56]0x399edc08:b 0x399edc1e;WebCore::Page::setDeviceScaleFactor(float) + 940x399edc0a: add.w r0, r5, #8720x399edc0e:bl 0x39dc7fa0;WebCore::Editor::deviceScaleFactorChanged()0x399edc12: add.w r0, r5, #280x399edc16:movs r1,#00x399edc18:bl 0x399f9ed0;WebCore::FrameTree::traverseNext(WebCore::Frame const*) const0x399edc1c: mov r5, r00x399edc1e:cmp r5,#00x399edc20:bne 0x399edc0a;WebCore::Page::setDeviceScaleFactor(float) + 740x399edc22:bl 0x399e6ed8;WebCore::pageCache()0x399edc26: 移动 r1, r40x399edc28: pop.w {r4, r5, r7, lr}0x399edc2c:b.w 0x399edc30;WebCore::PageCache::markPagesForFullStyleRecalc(WebCore::Page*)您可以在 viewWillDisappear 方法上停止加载 webview
[webview stopLoading]webview.delegate = nil;
或附加设置为空白页
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]];
祝你好运!
Im having trouble trying to figure this problem out because no matter what I do to get my problem to work i keep getting this crash
Heres the trace
$0 = 0x1f8f9a10 (
0 ??? 0x02b04144 0x0 + 45105476,
1 TheAppName 0x001016e0 start + 0,
2 Foundation 0x34334599 + 72,
3 WebCore 0x399e7bfb + 82,
4 UIKit 0x3595b493 + 182,
5 UIKit 0x358d7d1f + 382,
6 UIKit 0x358d7d33 + 402,
7 UIKit 0x358d7d33 + 402,
8 UIKit 0x358d7431 + 360,
9 UIKit 0x358d72c3 + 30,
10 UIKit 0x35ce2fef + 386,
11 UIKit 0x35ce3879 + 464,
12 UIKit 0x35ce63d3 + 698,
13 UIKit 0x35ce5e49 + 552,
14 UIKit 0x35ce28dd + 172,
15 UIKit 0x358d8803 + 258,
16 QuartzCore 0x35682d8b + 214,
17 QuartzCore 0x35682929 + 460,
18 QuartzCore 0x3568385d + 16,
19 QuartzCore 0x35683243 + 238,
20 QuartzCore 0x35683051 + 316,
21 QuartzCore 0x356ba0f7 + 254,
22 QuartzCore 0x356b9ff1 + 64,
23 IOMobileFramebuffer 0x37915fd7 + 154,
24 IOKit 0x346b4449 IODispatchCalloutFromCFMessage + 192,
25 CoreFoundation 0x33a975db + 118,
26 CoreFoundation 0x33aa2173 + 34,
27 CoreFoundation 0x33aa2117 + 138,
28 CoreFoundation 0x33aa0f99 + 1384,
29 CoreFoundation 0x33a13ebd CFRunLoopRunSpecific + 356,
30 CoreFoundation 0x33a13d49 CFRunLoopRunInMode + 104,
31 GraphicsServices 0x375ca2eb GSEventRunModal + 74,
32 UIKit 0x35929301 UIApplicationMain + 1120,
33 TheAppName 0x001332d9 main + 116,
34 TheAppName 0x00101708 start + 40
)
What i am doing is using a UIPageViewController as a slideshow. Sometimes when the page turns I need to load up an HTML file with a web view, these html files contain html code used to animate objects in the html page. So everytime I crete a new view controller to display in the pageViewController I need to destroy the webview because the aniamtion wont animate when going from one animation to another. Sometimes it works but sometimes it causes this crash. Now i have no idea how to read up on this since webviews are not documented so detailed as this message is. So does anyone know exactly what is going on here??
Code spit out when it breaks
WebCore`WebCore::Page::setDeviceScaleFactor(float):
0x399edbc0: push {r4, r5, r7, lr}
0x399edbc2: mov r4, r0
0x399edbc4: vmov d0, r1, r1
0x399edbc8: vldr s2, [r4, #100]
0x399edbcc: add r7, sp, #8
0x399edbce: vcmpe.f32s2, s0
0x399edbd2: vmrs APSR_nzcv, fpscr
0x399edbd6: it eq
0x399edbd8: popeq {r4, r5, r7, pc}
0x399edbda: vstr s0, [r4, #100]
0x399edbde: ldr r5, [r4, #56]
0x399edbe0: cbz r5, 0x399edc22 ; WebCore::Page::setDeviceScaleFactor(float) + 98
0x399edbe2: ldr.w r0, [r5, #804]
0x399edbe6: movs r1, #1
0x399edbe8: bl 0x39a3c3c0 ; WebCore::Document::styleResolverChanged(WebCore::StyleResolverUpdateFlag)
0x399edbec: add.w r0, r5, #28
0x399edbf0: movs r1, #0
0x399edbf2: bl 0x399f9ed0 ; WebCore::FrameTree::traverseNext(WebCore::Frame const*) const
0x399edbf6: mov r5, r0
0x399edbf8: cmp r5, #0
0x399edbfa: bne 0x399edbe2 ; WebCore::Page::setDeviceScaleFactor(float) + 34
0x399edbfc: ldr r0, [r4, #56]
0x399edbfe: cmp r0, #0
0x399edc00: beq 0x399edc22 ; WebCore::Page::setDeviceScaleFactor(float) + 98
0x399edc02: bl 0x39dee4f4 ; WebCore::Frame::deviceOrPageScaleFactorChanged()
0x399edc06: ldr r5, [r4, #56]
0x399edc08: b 0x399edc1e ; WebCore::Page::setDeviceScaleFactor(float) + 94
0x399edc0a: add.w r0, r5, #872
0x399edc0e: bl 0x39dc7fa0 ; WebCore::Editor::deviceScaleFactorChanged()
0x399edc12: add.w r0, r5, #28
0x399edc16: movs r1, #0
0x399edc18: bl 0x399f9ed0 ; WebCore::FrameTree::traverseNext(WebCore::Frame const*) const
0x399edc1c: mov r5, r0
0x399edc1e: cmp r5, #0
0x399edc20: bne 0x399edc0a ; WebCore::Page::setDeviceScaleFactor(float) + 74
0x399edc22: bl 0x399e6ed8 ; WebCore::pageCache()
0x399edc26: mov r1, r4
0x399edc28: pop.w {r4, r5, r7, lr}
0x399edc2c: b.w 0x399edc30 ; WebCore::PageCache::markPagesForFullStyleRecalc(WebCore::Page*)
You may stop webview loading on your viewWillDisappear method
[webview stopLoading]
webview.delegate = nil;
or with an additional set it to blank page
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]];
good luck!
这篇关于UIWebView 崩溃了,我不知道为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!