JDK-8222519 : ButtonDemoScreenshotTest fails randomly with "still state to be reached"
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2019-04-10
  • Updated: 2024-12-09
  • Resolved: 2019-04-30
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 11 JDK 13
11.0.7-oracleFixed 13 b21Fixed
Description
test ButtonDemoScreenshotTest.test("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"): failure
org.netbeans.jemmy.TimeoutExpiredException: Wait "Image of org.netbeans.jemmy.operators.JFrameOperator@2470a617 is still" state to be reached (ComponentOperator.WaitStateTimeout)
	at org.netbeans.jemmy.Waiter.waitAction(Waiter.java:208)
	at org.netbeans.jemmy.operators.Operator.waitState(Operator.java:720)
	at org.netbeans.jemmy.operators.Operator.waitState(Operator.java:694)
	at org.jemmy2ext.JemmyExt.waitImageIsStill(JemmyExt.java:190)
	at ButtonDemoScreenshotTest.test(ButtonDemoScreenshotTest.java:78)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
	at org.testng.TestRunner.privateRun(TestRunner.java:773)
	at org.testng.TestRunner.run(TestRunner.java:623)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
	at org.testng.SuiteRunner.run(SuiteRunner.java:259)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
	at org.testng.TestNG.run(TestNG.java:1018)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:835)
Comments
Fix request (11u) I would like to downport this for parity with 11.0.7-oracle. Applies clean.
24-12-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/a7a436e080c1 User: psadhukhan Date: 2019-05-15 09:11:03 +0000
15-05-2019

URL: http://hg.openjdk.java.net/jdk/client/rev/a7a436e080c1 User: akolarkunnu Date: 2019-04-30 11:16:20 +0000
30-04-2019

Fix is to add -Dswing.disablevistaanimation=true along with run command. * @run testng/othervm/timeout=600 -Dswing.disablevistaanimation=true ButtonDemoScreenshotTest
16-04-2019

Trying with option -Dswing.disablevistaanimation=true.
16-04-2019

Comment from Sergey : I think the root cause is that the default button is animated. Probably OCI VM is slower than the common systems and the button could animate a few times. Does this option helps? -Dswing.disablevistaanimation=true
16-04-2019