RFR: 8273485: Deadlock when also using Swing and exiting Fullscreen on Mac [v4]
Kevin Rushforth
kcr at openjdk.java.net
Fri Sep 17 12:47:48 UTC 2021
On Thu, 16 Sep 2021 13:22:32 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
>> When using Swing it's possible to generate a Deadlock.
>> It's related to the nested eventloop started in enterFullScreenExitingLoop - and the RenderLock aquired when using setView in Scene.
>> Sample Programm and Threaddump are added to the ticket.
>>
>> Removing the nested loop fixes the Problem.
>> I hope this doesn't have any side effect - so far i don't know of any.
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8273485
> small cleanup of the changes.
> I've adapted the solution to entirely remove the nested event loop, for the fullscreen. So far everything seems to work.
> I've tested it with a simple application to check how the fullscreen behaves.
> The logic seems to be added before the beginning of the VCS / 2013
> Is there away to look into the history before 2013? Maybe there is a hint, why this was added.
I tracked down the bug fix that added the nested event loop (looking at the history of the closed-source changes, since this fix was done prior to open-sourcing glass). It was added to fix [JDK-8126842](https://bugs.openjdk.java.net/browse/JDK-8126842).
As I suspected, the nested even loop is still necessary. If you run the test program attached to JDK-8126842 with your patch applied, make the window full-screen using the green button, then click the close button, the program will terminate with an exception.
-------------
Changes requested by kcr (Lead).
PR: https://git.openjdk.java.net/jfx/pull/622
More information about the openjfx-dev
mailing list