JDK-8162410 : Regression in b124: problem with Robot::waitForIdle on Windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • Submitted: 2016-07-22
  • Updated: 2016-08-08
  • Resolved: 2016-08-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Relates :  
Description
Simplest example of the issue is 
javax/swing/ToolTipManager/Test6256140.java

This test displays a JFormattedTextField with a visible tooltip. 
Robot does press 'a' and then

       robot.waitForIdle();

        if (!isTooltipShowning()) {
            throw new RuntimeException("Tooltip is not shown");
        }

        robot.keyPress(KeyEvent.VK_ESCAPE);
        robot.keyRelease(KeyEvent.VK_ESCAPE);

Problem is, almost always the test either hangs in robot.waitForIdle() and doesn't even enter that isTooltipShowning() or does it too fast so that tooltip is not visible yet. The first situation is typical for an individual test rerun.
Something should be done with that ASAP.

RULE "javax/swing/ToolTipManager/Test6256140.java" Exception java.lang.RuntimeException: Tooltip is not shown
RULE "javax/swing/ToolTipManager/Test6256140.java"  Timeout none
Comments
Issue is fixed with patch, http://hg.openjdk.java.net/jdk9/client/jdk/rev/2624f115072a
08-08-2016

I'll attach here a test invariably hanging in waitForIdle() on Windows i586 since jdk9 b124. Put the sources in a directory, compile and run with a switch -DresultsDir=. RULE "AWT_MouseInfoTest/Automated/MouseWheeTest/ConsumeMouseWheelEventTest" Timeout none
02-08-2016