RFR: 8221261: deadlock of CInputMethod.characterIndexForPoint and webkit.InputMethodClientImpl.getLocationOffset

Kevin Rushforth kcr at openjdk.org
Fri Jan 5 23:48:20 UTC 2024


On Fri, 22 Dec 2023 11:27:00 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

> A dead-lock is caused by the interaction of MacOS, the AWTEventQueue and JavaFX when the users pressed the Caps Lock key while the AWTEventQueue is processing another event (more on this in the issue). The bug depends on the specific timing of the event sending and can apparently be prevented by finishing all incoming OS events directly while the LWCToolkit.invokeAndWait method is executed.
> 
> This fix is tested and fixes the issue.
> 
> I attached a small
> [reproducer](https://github.com/openjdk/jdk/files/13751865/Archive.zip), just run it with `mvn install package javafx:run`.

I spent a fair bit of time over the last couple of days testing different solutions to this, as well as some initial discussions with Phil and Prasanta, and I believe that taking Anton's proposed solution and expanding it to cover all of the methods in CInputMethod is the best way to go. I created a Draft PR #17290 with that solution.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17184#issuecomment-1879386874


More information about the client-libs-dev mailing list