callstack在下面。我对这件事感到有点难过。该应用程序随机崩溃。我唯一的线索是它总是在用户处理UIWebViews时。 难道可能是因为我没有把webview委托或者正在呈现的页面中的一些视频元素取出来吗?有没有人见过类似的东西? 谢谢!
UIWebView是UIViewController中视图的子代。 viewDidLoad是初始化webView的地方
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.webView.delegate = self;
self.webView.scalesPageToFit = YES;
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.startingUrl]]];
}
Thread : Crashed: WebThread
0 libobjc.A.dylib 0x0000000197487bd0 objc_msgSend + 16
1 UIKit 0x000000018a956ad8 -[UIViewAnimationState animationForLayer:forKey:forView:] + 720
2 UIKit 0x000000018a6c5df4 -[UIViewAnimationState actionForLayer:forKey:forView:] + 44
3 UIKit 0x000000018a689fec -[UIView(CALayerDelegate) actionForLayer:forKey:] + 140
4 QuartzCore 0x0000000189fd5378 -[CALayer actionForKey:] + 104
5 QuartzCore 0x0000000189fca92c actionForKey(CALayer*, CA::Transaction*, NSString*) + 100
6 QuartzCore 0x0000000189fca798 CA::Layer::begin_change(CA::Transaction*, unsigned int, objc_object*&) + 176
7 QuartzCore 0x0000000189fcd7f8 CA::Layer::setter(unsigned int, _CAValueType, void const*) + 160
8 QuartzCore 0x0000000189fd5304 -[CALayer setOpacity:] + 48
9 UIKit 0x000000018a689a40 -[UIView(Rendering) setAlpha:] + 112
10 MediaPlayer 0x0000000187f557b0 -[MPVolumeSlider _layoutForAvailableRoutes] + 1448
11 MediaPlayer 0x0000000187f5413c -[MPVolumeSlider layoutSubviews] + 80
12 UIKit 0x000000018a68d760 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 580
13 QuartzCore 0x0000000189fd5e1c -[CALayer layoutSublayers] + 152
14 QuartzCore 0x0000000189fd0884 CA::Layer::layout_if_needed(CA::Transaction*) + 320
15 UIKit 0x000000018a6a1f94 -[UIView(Hierarchy) layoutBelowIfNeeded] + 160
16 UIKit 0x000000018a6a7830 -[UISlider setValue:animated:] + 196
17 MediaPlayer 0x0000000187f5492c -[MPVolumeSlider volumeController:volumeValueDidChange:] + 92
18 MediaPlayer 0x0000000187fc7a00 -[MPVolumeController updateVolumeValue] + 260
19 MediaPlayer 0x0000000187f54284 -[MPVolumeSlider didMoveToSuperview] + 144
20 UIKit 0x000000018a68c2bc -[UIView(Hierarchy) _postMovedFromSuperview:] + 484
21 UIKit 0x000000018a6980b0 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1792
22 MediaPlayer 0x0000000187f57528 -[MPVolumeView _createSubviews] + 264
23 MediaPlayer 0x0000000187f55fa8 -[MPVolumeView _initWithStyle:] + 240
24 MediaPlayer 0x0000000187f56034 -[MPVolumeView initWithFrame:style:] + 88
25 WebCore 0x0000000194ebd51c -[WebMediaSessionHelper allocateVolumeView] + 192
26 WebCore 0x0000000194ebd7f8 -[WebMediaSessionHelper initWithCallback:] + 468
27 WebCore 0x0000000194ebcbf8 WebCore::MediaSessionManageriOS::MediaSessionManageriOS() + 96
28 WebCore 0x0000000194ebcb68 WebCore::MediaSessionManager::sharedManager() + 56
29 WebCore 0x0000000194ebb66c WebCore::MediaSession::MediaSession(WebCore::MediaSessionClient&) + 44
30 WebCore 0x00000001949fb33c WebCore::HTMLMediaSession::create(WebCore::MediaSessionClient&) + 36
31 WebCore 0x00000001949e3c34 WebCore::HTMLMediaElement::HTMLMediaElement(WebCore::QualifiedName const&, WebCore::Document&, bool) + 1100
32 WebCore 0x0000000194a1d024 WebCore::HTMLVideoElement::create(WebCore::QualifiedName const&, WebCore::Document&, bool) + 68
33 WebCore 0x00000001949d0664 WebCore::videoConstructor(WebCore::QualifiedName const&, WebCore::Document&, WebCore::HTMLFormElement*, bool) + 92
34 WebCore 0x00000001949cf554 WebCore::HTMLElementFactory::createElement(WebCore::QualifiedName const&, WebCore::Document&, WebCore::HTMLFormElement*, bool) + 336
35 WebCore 0x00000001944af29c WebCore::HTMLDocument::createElement(WTF::AtomicString const&, int&) + 112
36 WebCore 0x00000001944af198 WebCore::jsDocumentPrototypeFunctionCreateElement(JSC::ExecState*) + 364
37 JavaScriptCore 0x00000001874a2fb0 llint_entry + 26160
38 JavaScriptCore 0x00000001874a2b0c llint_entry + 24972
39 JavaScriptCore 0x00000001874a29dc llint_entry + 24668
40 JavaScriptCore 0x000000018749c764 callToJavaScript + 308
41 JavaScriptCore 0x000000018740aac8 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 48
42 JavaScriptCore 0x00000001871568d0 JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*) + 7652
43 JavaScriptCore 0x000000018715497c JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, JSC::JSValue*) + 476
44 WebCore 0x00000001950496b0 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&) + 284
45 WebCore 0x00000001944d27c0 WebCore::ScriptController::evaluate(WebCore::ScriptSourceCode const&) + 52
46 WebCore 0x00000001944d2728 WebCore::ScriptElement::executeScript(WebCore::ScriptSourceCode const&) + 332
47 WebCore 0x000000019465639c WebCore::ScriptElement::execute(WebCore::CachedScript*) + 184
48 WebCore 0x000000019504f6e4 WebCore::ScriptRunner::timerFired(WebCore::Timer<WebCore::ScriptRunner>&) + 492
49 WebCore 0x00000001944a5560 WebCore::ThreadTimers::sharedTimerFiredInternal() + 148
50 WebCore 0x00000001944a54a4 WebCore::timerFired(__CFRunLoopTimer*, void*) + 36
51 CoreFoundation 0x0000000185c0812c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
52 CoreFoundation 0x0000000185c07ddc __CFRunLoopDoTimer + 888
53 CoreFoundation 0x0000000185c05828 __CFRunLoopRun + 1372
54 CoreFoundation 0x0000000185b312d4 CFRunLoopRunSpecific + 396
55 WebCore 0x000000019452c894 RunWebThread(void*) + 468
56 libsystem_pthread.dylib 0x0000000197ca7dc8 _pthread_body + 164
57 libsystem_pthread.dylib 0x0000000197ca7d24 _pthread_body
答案 0 :(得分:0)
UIWebView加载html包含audio
或vedio
标签,会随机崩溃。这是在allocateVolumeView时的WebKit的错误。现在我修复了这个bug。