-
Bug
-
Resolution: Won't Fix
-
P3
-
7u10
-
We hit this issue during unit testing of JDeveloper in a headless environment.
According to Ron this started happening in 7u10, but it appears to not be an issue in 7u7.
Ron van Grinsven from JDeveloper and Artem Ananiev from the JDK has communicated about a race condition bug in the EventQueue which occasionally causes some Events to sit in the queue unprocessed causing some unit tests to fail.
The problem reproduces with a specific sequence involving three threads.
1) sun.awt.AWTAutoShutdown.theInstance.blockerThread
2) a client thread posting an event using EventQueue.postEvent
3) the current java.awt.EventQueue.dispatchThread (java.awt.EventQueue.dispatchThread)
The problem occurs when the client thread posts the event after the shutdown thread posts its event to
shutdown, and before the current dispatch threads completes its shutdown processing.
See attached pdf file with detailed explanations.
The problem reproduces with a specific sequence involving three threads.
1) sun.awt.AWTAutoShutdown.theInstance.blockerThread
2) a client thread posting an event using EventQueue.postEvent
3) the current java.awt.EventQueue.dispatchThread (java.awt.EventQueue.dispatchThread)
The problem occurs when the client thread posts the event after the shutdown thread posts its event to
shutdown, and before the current dispatch threads completes its shutdown processing.
See attached pdf file with detailed explanations.