Client: specialized ReaderMode.userContentController(WKUserContentController, didReceiveScriptMessage : WKScriptMessage) -> () + 1912

RESOLVED FIXED

Status

()

--
critical
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: aaronmt, Assigned: st3fan)

Tracking

({crash, steps-wanted})

unspecified
All
iOS
crash, steps-wanted

Firefox Tracking Flags

(fxios-v3.0 ?, fxios4.0+)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Incident Identifier: F0D4D610-17E9-4144-8E30-849CAD0C89EE
CrashReporter Key:   a9d2de3b10dcb541bf57d63b88ee0c7796414c0b
Hardware Model:      iPhone7,1
Process:             Client [1920]
Path:                /private/var/containers/Bundle/Application/B8105A11-CF73-4FD2-A274-467F2E5E48D6/Client.app/Client
Identifier:          org.mozilla.ios.Firefox
Version:             11 (3.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2016-04-03 01:12:22.22 +0100
Launch Time:         2016-04-03 00:52:28.28 +0100
OS Version:          iOS 9.3 (13E233)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000eb178
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   Client                        	0x00000001000eb178 specialized ReaderMode.userContentController(WKUserContentController, didReceiveScriptMessage : WKScriptMessage) -> () + 1912 (ReaderMode.swift:252)
1   Client                        	0x00000001000e96a8 protocol witness for BrowserHelper.userContentController<A where ...>(WKUserContentController, didReceiveScriptMessage : WKScriptMessage) -> () in conformance ReaderMode + 84 (ReaderMode.swift:261)
2   Client                        	0x0000000100215040 specialized (HelperManager in _51AAA34A1E0B8817D1AAA32D321A88D7).userContentController(WKUserContentController, didReceiveScriptMessage : WKScriptMessage) -> () + 2940 (Browser.swift:437)
3   Client                        	0x0000000100212008 @objc (HelperManager in _51AAA34A1E0B8817D1AAA32D321A88D7).userContentController(WKUserContentController, didReceiveScriptMessage : WKScriptMessage) -> () + 68 (Browser.swift:0)
4   WebKit                        	0x0000000188ceed44 ScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebKit::SecurityOriginData const&, WebCore::SerializedScriptValue&) + 228 (WKUserContentController.mm:94)
5   WebKit                        	0x0000000188c966e0 WebKit::WebUserContentControllerProxy::didPostMessage(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&) + 212 (WebUserContentControllerProxy.cpp:183)
6   WebKit                        	0x0000000188c985c0 void IPC::handleMessage<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&)>(IPC::Connection&, IPC::MessageDecoder&, WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&)) + 112 (HandleMessage.h:64)
7   WebKit                        	0x0000000188af2940 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::MessageDecoder&) + 120 (MessageReceiverMap.cpp:102)
8   WebKit                        	0x0000000188c783b4 WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) + 32 (WebProcessProxy.cpp:478)
9   WebKit                        	0x0000000188aadb50 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 136 (Connection.cpp:877)
10  WebKit                        	0x0000000188aafbfc IPC::Connection::dispatchOneMessage() + 120 (Connection.cpp:928)
11  JavaScriptCore                	0x0000000184923b84 WTF::RunLoop::performWork() + 484 (functional:1793)
12  JavaScriptCore                	0x00000001849241e0 WTF::RunLoop::performWork(void*) + 36 (RunLoopCF.cpp:38)
13  CoreFoundation                	0x0000000180cf1124 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1761)
14  CoreFoundation                	0x0000000180cf0bb8 __CFRunLoopDoSources0 + 540 (CFRunLoop.c:1807)
15  CoreFoundation                	0x0000000180cee8b8 __CFRunLoopRun + 724 (CFRunLoop.c:2536)
16  CoreFoundation                	0x0000000180c18d10 CFRunLoopRunSpecific + 384 (CFRunLoop.c:2814)
17  GraphicsServices              	0x0000000182500088 GSEventRunModal + 180 (GSEvent.c:2245)
18  UIKit                         	0x0000000185eedf70 UIApplicationMain + 204 (UIApplication.m:3772)
19  Client                        	0x000000010021ea10 main + 340 (main.swift:24)
20  libdyld.dylib                 	0x00000001807b68b8 start + 4 (start_glue.s:78)
(Assignee)

Updated

2 years ago
tracking-fxios: ? → 4.0+
(Assignee)

Comment 1

2 years ago
Created attachment 8740729 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1711
Attachment #8740729 - Flags: review?(bnicholson)
(Assignee)

Updated

2 years ago
Assignee: nobody → sarentz
(Assignee)

Updated

2 years ago
Status: NEW → ASSIGNED
Comment on attachment 8740729 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1711

The helper requires a (non-nil) Browser in init. So I guess what's happening is that the tab is removed while the web view is in the middle of a page load, destroying the Browser, and the web view sends a reader message during this short window before it's also destroyed?
Attachment #8740729 - Flags: review?(bnicholson) → review+
(Assignee)

Comment 3

2 years ago
I think that is what is happening. Because browser is weak, it can never be force unwrapped. That is just asking for trouble. So that is a good fix, but I am worried that there is a deeper problem. Hopefully the symptoms will show better after this fix.
(Assignee)

Updated

2 years ago
Whiteboard: [needsuplift]
(Assignee)

Updated

2 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Whiteboard: [needsuplift]
(Assignee)

Comment 4

2 years ago
master: 3263418
v4.x: 4ac799b
You need to log in before you can comment on or make changes to this bug.