Hi Sergey,
Maybe the robot mouse events are not getting enough time to be processed
which is why the toolkit shutdown is not able to happen as those are
still in the event queue. Adding waitForIdle() in the test allows those
robot events to be processed and then toolkit thread gets chance to get
disposed and system shutdown takes place ok.
Regards
Prasanta
On 2/14/2018 12:51 PM, Sergey Bylokhov wrote:
Hi, Prasanta.
I think that the suspicious place in the stack is below, it tries to
execute hooks during system shutdown and hangs.
The hook which hangs is "ToolkitShutdown #18 daemon" from the WToolkit
class. I guess that the code which hangs is a loop in the:
Java_sun_awt_windows_WToolkit_shutdown:
while (!tk.IsDisposed()) {
Sleep(100);
}
So it does not look like a test bug.
On 13/02/2018 22:38, Prasanta Sadhukhan wrote:
"main" #1 prio=5 os_prio=0 tid=0x000001b83d8ad000 nid=0x3e84 in
Object.wait() [0x0000003e642fe000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@10-ea/Native Method)
- waiting on <0x00000006d2880200> (a java.lang.Thread)
at java.lang.Thread.join(java.base@10-ea/Thread.java:1353)
- waiting to re-lock in wait() <0x00000006d2880200> (a
java.lang.Thread)
at java.lang.Thread.join(java.base@10-ea/Thread.java:1427)
at
java.lang.ApplicationShutdownHooks.runHooks(java.base@10-ea/ApplicationShutdownHooks.java:107)
at
java.lang.ApplicationShutdownHooks$1.run(java.base@10-ea/ApplicationShutdownHooks.java:46)
at java.lang.Shutdown.runHooks(java.base@10-ea/Shutdown.java:123)
at java.lang.Shutdown.sequence(java.base@10-ea/Shutdown.java:167)
at java.lang.Shutdown.exit(java.base@10-ea/Shutdown.java:212)