Bug 182460 - UI process sometimes crashes under -[WKContentView _lookupForWebView:]
Summary: UI process sometimes crashes under -[WKContentView _lookupForWebView:]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-03 15:20 PST by Tim Horton
Modified: 2018-02-03 19:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.13 KB, patch)
2018-02-03 15:20 PST, Tim Horton
wenson_hsieh: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2018-02-03 15:20:08 PST
UI process sometimes crashes under -[WKContentView _lookupForWebView:]
Comment 1 Tim Horton 2018-02-03 15:20:23 PST
Created attachment 333039 [details]
Patch
Comment 2 Tim Horton 2018-02-03 15:20:39 PST
<rdar://problem/33260602>
Comment 3 Wenson Hsieh 2018-02-03 15:31:45 PST
Comment on attachment 333039 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=333039&action=review

r=me

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2008
> +        auto& editorState = view->_page->editorState();

It seems a bit strange that selectedText exists, but there are no selection rects. Is it possible we're missing post-layout data in this case? Or perhaps the if (!selectedText) early return above should be if (selectedText.isEmpty()) instead?
Comment 4 Tim Horton 2018-02-03 15:43:15 PST
I seem to recall there being some weird corner cases where we end up with no rects (or empty rects that get collapsed to no rects) despite having selected text, but couldn’t remember or re-discover what those cases are. Maybe Enrica remembers. In any case, it seems better to check the thing you’re about to depend on.

Thank you for your review!
Comment 5 WebKit Commit Bot 2018-02-03 15:44:32 PST
Comment on attachment 333039 [details]
Patch

Rejecting attachment 333039 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 333039, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
rdparty/autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
  File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 60] Operation timed out>

Full output: http://webkit-queues.webkit.org/results/6348787
Comment 6 Tim Horton 2018-02-03 15:46:08 PST
Fine, I’ll do it myself.
Comment 7 Tim Horton 2018-02-03 19:36:11 PST
https://trac.webkit.org/changeset/228050/webkit