Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8322703

Intermittent crash in WebView in a JFXPanel from IME calls on macOS

XMLWordPrintable

    • web
    • b03
    • os_x

        To reproduce, do the following on macOS 14 Sonoma:

        1. Run the attached Swing / JavaFX interop test program:
        $ java HelloWebViewJFXPanel

        2. Press the CAPS LOCK key

        BUG: It will either hit the deadlock described in JDK-8221261 or it will crash

        This JBS BUG bug will track the crash. This is likely caused by calling into WebKit on the wrong thread from the WebKit IME code. A similar bug was fixed in JDK-8196011.

        I discovered this while doing some testing of a proposed fix for JDK-8221261 / PR openjdk/jdk#17184 [1], I ran into a crash where native WebKit code is being called on the AWT Event thread. This suggests that other JavaFX WebView InputMethodClientImpl methods will likely need the same treatment that firstRectForCharacterRange and characterIndexForPoint got in the fix for JDK-8196011. This crash isn't caused by the proposed fix for the deadlock, since I see it intermittently with a JDK without the deadlock fix (e.g., JDK 21.0.1).

              kcr Kevin Rushforth
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: