Closed
Bug 1250147
Opened 10 years ago
Closed 9 years ago
Crash at Client: -[OnePasswordExtension createExtensionItemForURLString:webPageDetails:completion:] + 332
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronmt, Assigned: jhugman)
Details
(Keywords: crash, steps-wanted)
Attachments
(1 file)
Incident Identifier: 5D791E9B-9FEC-4F00-AA79-409DEB0552B1
CrashReporter Key: bc60a75a6c71832c3e75a98b9dfeb67a7380d7ee
Hardware Model: iPhone8,1
Process: Client [860]
Path: /private/var/mobile/Containers/Bundle/Application/C9D62E72-A2FF-4AEB-80E8-B782DAC8546C/Client.app/Client
Identifier: org.mozilla.ios.Firefox
Version: 2006 (2.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-02-19 11:23:47.47 -0800
Launch Time: 2016-02-19 11:23:26.26 -0800
OS Version: iOS 9.2.1 (13D15)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x182115900 __exceptionPreprocess + 124 (NSException.m:162)
1 libobjc.A.dylib 0x181783f80 objc_exception_throw + 56 (objc-exception.mm:531)
2 CoreFoundation 0x1820041a8 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 324 (NSDictionary.m:165)
3 CoreFoundation 0x182004040 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 64 (NSDictionary.m:1590)
4 Client 0x1000e7210 -[OnePasswordExtension createExtensionItemForURLString:webPageDetails:completion:] + 332 (OnePasswordExtension.m:548)
5 Client 0x1000e534c __65-[OnePasswordExtension createExtensionItemForWebView:completion:]_block_invoke + 140 (OnePasswordExtension.m:271)
6 WebKit 0x189b45f10 std::__1::__function::__func<-[WKWebView evaluateJavaScript:completionHandler:]::$_0, std::__1::allocator<-[WKWebView evaluateJavaScript:completionHandler:]::$_0>, void (API::SerializedScriptValue*, bool, WebKit::CallbackBase::Error)>::operator()(API::SerializedScriptValue*&&, bool&&, WebKit::CallbackBase::Error&&) + 344 (WKWebView.mm:646)
7 WebKit 0x189a782f4 WebKit::GenericCallback<API::SerializedScriptValue*, bool>::performCallbackWithReturnValue(API::SerializedScriptValue*, bool) + 68 (functional:1793)
8 WebKit 0x189a716ec WebKit::WebPageProxy::scriptValueCallback(IPC::DataReference const&, bool, unsigned long long) + 152 (WebPageProxy.cpp:4772)
9 WebKit 0x189a8c188 void IPC::handleMessage<Messages::WebPageProxy::ScriptValueCallback, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(IPC::DataReference const&, bool, unsigned long long)>(IPC::MessageDecoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(IPC::DataReference const&, bool, unsigned long long)) + 92 (HandleMessage.h:22)
10 WebKit 0x18993afd4 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::MessageDecoder&) + 120 (MessageReceiverMap.cpp:102)
11 WebKit 0x189ac0f8c WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) + 32 (WebProcessProxy.cpp:478)
12 WebKit 0x1898f614c IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 136 (Connection.cpp:877)
13 WebKit 0x1898f81f8 IPC::Connection::dispatchOneMessage() + 120 (Connection.cpp:928)
14 JavaScriptCore 0x1858d7068 WTF::RunLoop::performWork() + 484 (functional:1793)
15 JavaScriptCore 0x1858d76c4 WTF::RunLoop::performWork(void*) + 36 (RunLoopCF.cpp:38)
16 CoreFoundation 0x1820ccefc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1761)
17 CoreFoundation 0x1820cc990 __CFRunLoopDoSources0 + 540 (CFRunLoop.c:1807)
18 CoreFoundation 0x1820ca690 __CFRunLoopRun + 724 (CFRunLoop.c:2536)
19 CoreFoundation 0x181ff9680 CFRunLoopRunSpecific + 384 (CFRunLoop.c:2814)
20 GraphicsServices 0x183508088 GSEventRunModal + 180 (GSEvent.c:2245)
21 UIKit 0x186e70d90 UIApplicationMain + 204 (UIApplication.m:3681)
22 Client 0x100114fb0 main + 332 (main.swift:22)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(jhugman)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jhugman
Flags: needinfo?(jhugman)
Updated•10 years ago
|
Rank: 3
Updated•10 years ago
|
Assignee | ||
Comment 1•10 years ago
|
||
Recreated the crash on that line by providing a nil value for URLString.
If this is the same crash, then this is most likely the WKWebView having a URL.absoluteString being nil.
Trying to recreate that.
If this is the likely cause, then an extra guard condition in OnePasswordExtension.m createExtensionItemForURLString:webPageDetails:completion against a nil URLString would help.
N.B. Acknowledged, URLString is meant to be (nonnull NSString *), but WKWebView.URL property is NSURL?.
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
I'm unable to reproduce this, so I'm not sure how invasive to make this fix.
Aaron – have you any STR with these clues?
Flags: needinfo?(aaron.train)
Reporter | ||
Comment 3•10 years ago
|
||
> Recreated the crash on that line by providing a nil value for URLString.
Nice.
> I'm unable to reproduce this
Huh?
> Aaron – have you any STR with these clues?
No idea.
Flags: needinfo?(aaron.train)
Assignee | ||
Comment 4•10 years ago
|
||
I'm able to reproduce this crashlog in a sample project: either the JSON object from webcontent, or the URLString needs to be nil.
I'm satisfied that there are enough safeguards that the JSON object will always be populated with a non-empty dictionary.
What I can't reproduce is this: making the URL invalid enough that the URL string passed to the crashing line is nil. (in other bugs, about: URLs are parsed as valid URLs, but not actually accepted by the thing that you're passing it to, e.g. NSUserActivity).
Flags: needinfo?(aaron.train)
Comment 5•10 years ago
|
||
Hi Aaron,
Does this crash occur on a particular website or it can happen on any website?
Am I correct to assume that you are using the latest stable versions of 1Password and of Firefox?
I look forward to your reply :-)
Cheers!
Reporter | ||
Comment 6•10 years ago
|
||
This is just pulled from the Xcode organizer based on a number of incoming reports. I have yet to run into this crash.
Flags: needinfo?(aaron.train)
Comment 7•9 years ago
|
||
Hi Aaron,
I think that the best way to investigate this issue is to log if the web view's URL is nil or invalid before calling the 1Password Extension API in Firefox ( https://github.com/mozilla/firefox-ios/blob/61f65db01302b129b4d8558c93fc6fdf81a7dd59/Client/Frontend/Share/ShareExtensionHelper.swift#L142 ) and in the local OnePasswordExtension.m ( https://github.com/AgileBits/onepassword-app-extension/blob/master/OnePasswordExtension.m#L271 ) from Carthage.
Let me know if this helps ;-)
Cheers!
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8731755 -
Flags: review?(sleroux)
Comment 9•9 years ago
|
||
Comment on attachment 8731755 [details] [review]
Pull request
Makes sense. The joy of Swift/ObjC bridging.
Attachment #8731755 -
Flags: review?(sleroux) → review+
Updated•9 years ago
|
Whiteboard: [needsuplift]
Updated•9 years ago
|
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•9 years ago
|
||
Merged.
Comment 11•9 years ago
|
||
v3.x ac50d72
You need to log in
before you can comment on or make changes to this bug.
Description
•