Bug 182460

Summary: UI process sometimes crashes under -[WKContentView _lookupForWebView:]
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Severity: Normal CC: commit-queue, enrica, megan_gardner, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch wenson_hsieh: review+, commit-queue: commit-queue-

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]
Comment 2 Tim Horton 2018-02-03 15:20:39 PST
Comment 3 Wenson Hsieh 2018-02-03 15:31:45 PST
Comment on attachment 333039 [details]

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


> 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]

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