[Webkit-unassigned] [Bug 187843] -[WKContentView(WKInteraction) _restoreFocusWithToken:] crashed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 3 06:26:54 PDT 2018


--- Comment #9 from 894110476 at qq.com ---
Thanks a lot.

Unfortunately! It is our Official app instead of test app! we found two scenes the problem occurs. The first one is when UINaivgationController pop to the webviewController which had been removed as mentioned above (we do not remove the webviewController in our newer app, and the crash rate Significantly reduced).The other is when a presented ViewController who had push some webviewcontrollers is dismissing,then app crashed, the detail navigation stack just as Hank said.

It should be noted that all conclusion is summarized from our monitor. not reproducing the problem.

(In reply to Wenson Hsieh from comment #7)
> Thanks for the information! From a quick glance, what could be happening is
> that we're getting an extra call to -_restoreFocusWithToken: when we don't
> expect to. The API (SPI?) contract for focus restoration is that each call
> to -_preserveFocusWithToken: should be bookended with exactly one call to
> -_restoreFocusWithToken:, so any mismatch here would cause us to crash in
> the UI process when we try and remove from _focusStateStack in this if
> statement:
>     if (_focusStateStack.takeLast())
> It probably makes sense to fail gracefully by bailing early if the focus
> state stack is empty here instead of merely debug asserting like we do now.
> That being said, the root cause is most likely beneath WebKit, in logic
> that's responsible for telling us to preserve or restore focus.
> Regarding your comment in the other bug (181510):
> > if we remove a webview when it is not on the top of navigationcontroller's viewcontrollers. when back to the 'webviewpage(had removed)', a crash will happen low frequently
> Do you happen to have a test app that exercises this scenario? That would be
> very helpful in confirming a fix!

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180803/9656e8d5/attachment.html>

More information about the webkit-unassigned mailing list