<AWT Dev> OpenJdk11-28-EA JDialog hanging

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Oct 26 21:59:57 UTC 2018

On 25/10/2018 01:05, Laurent Bourgès wrote:
> According to me, Martin already exposed his detailled analysis of 2 cases making AWT to hang with several AppContexts: in summary, like a deadlock, the EDT threads are waiting for each other to dispatch SequencedEvents !

If you are talking about an example from this message:

Then pay attention that it describes not a deadlock, but another situation. It has 4 events, one of them is dispatched in correct order(because it was created first), but others are not dispatched because they are not wakeup by the dispatched event. To me it looks like the bug is in the SequencedEvent.dispose() method, which should wakeup EDT where the next event should be dispatched.
Maybe it is possible to create/post a dummy WakeupEvent which will use SequencedEvent.ID and be used to wakeup the EDT?

Take a look to the test which was added in JDK-8152974:

This test creates a number of SequencedEvents and posts them in a different order to one/to many apcontexts, all of them are dispatched in the right order. I think it should be possible to create a new test based on the test above, which will fail on all platforms.

Best regards, Sergey.

More information about the awt-dev mailing list