JDK-8172065 : javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad"
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u112,9,10,17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2016-12-27
  • Updated: 2022-06-16
  • Resolved: 2021-12-06
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 15 JDK 17 JDK 18
11.0.17-oracleFixed 15.0.8Fixed 17.0.5-oracleFixed 18 b27Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+148)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+148, mixed mode)

java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.14393]

A DESCRIPTION OF THE PROBLEM :
The test javax/swing/JTree/4908142/bug4908142.java fails with the following output "The selected index should be "aad", but not aaa"
This issue was reproduced with JDK9
This failure was observed on Windows. It has never been observed on Linux, OSX.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
jtreg -v -a -xml -testjdk:C:/Java/jdk-9 -javaoptions:-Djava.awt.headless=false -timeoutFactor:2 test/javax/swing/JTree


ERROR MESSAGES/STACK TRACES THAT OCCUR :
#section:main
----------messages:(4/125)----------
command: main bug4908142
reason: User specified action: run main bug4908142 
Mode: othervm
elapsed time (seconds): 1.118
----------configuration:(0/0)----------
----------System.out:(0/0)----------
----------System.err:(13/780)----------
java.lang.Error: The selected index should be "aad", but not aaa
	at bug4908142.main(bug4908142.java:89)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.Error: The selected index should be "aad", but not aaa
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Error: The selected index should be "aad", but not aaa

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/8b04ee324a1a/test/javax/swing/JTree/4908142/bug4908142.java
---------- END SOURCE ----------


Comments
Fix request (15u) The clean backport. - Justification: The stability fix for the test. - Risk Analysis: Low https://github.com/openjdk/jdk15u-dev/pull/221
13-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk15u-dev/pull/221 Date: 2022-06-12 21:01:27 +0000
13-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1142 Date: 2022-06-10 22:03:37 +0000
10-06-2022

Fix request (11u) The clean backport. - Justification: The stability fix for the test. - Risk Analysis: Low https://github.com/openjdk/jdk11u-dev/pull/1142
10-06-2022

Fix request (17u) The clean backport. - Justification: The stability fix for the test. - Risk Analysis: Low https://github.com/openjdk/jdk17u-dev/pull/458
10-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/458 Date: 2022-06-10 02:07:48 +0000
10-06-2022

The fix for this bug is in jdk-18+27-1872.
06-12-2021

Changeset: 082fdf47 Author: Prasanta Sadhukhan <psadhukhan@openjdk.org> Date: 2021-12-06 16:08:28 +0000 URL: https://git.openjdk.java.net/jdk/commit/082fdf479367612a7bd795d3becfe9830db4b2d6
06-12-2021

ok..Review is out..hopefully it will solve this cases...
06-12-2021

[~psadhukhan] it is failing on x64 macOS as well.
06-12-2021

It seem to have started failing in macosx-12 in aarch64 system
02-12-2021

Here's a log file snippet for the dcubed-8272058_for_jdk18-20211201-0349-26746350 sighting: javax/swing/JTree/4908142/bug4908142.java #section:main ----------messages:(5/182)---------- command: main bug4908142 reason: User specified action: run main bug4908142 Mode: othervm Additional options from @modules: --add-modules java.desktop elapsed time (seconds): 4.233 ----------configuration:(3/40)---------- Boot Layer add modules: java.desktop ----------System.out:(0/0)---------- ----------System.err:(11/657)---------- java.lang.Error: The selected index should be "aad", but not ade at bug4908142.main(bug4908142.java:93) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:833) JavaTest Message: Test threw exception: java.lang.Error: The selected index should be "aad", but not ade JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.Error: The selected index should be "aad", but not ade ----------rerun:(42/7058)*---------- Update: I've attached the screen1.png file: test-support_jtreg_open_test_jdk_jdk_desktop_javax_swing_JTree_4908142_bug4908142_screen1.png There's a "Notifications & Focus" dialog open on the desktop. I don't know if that's part of the test or if it's the cause of this failure sighting.
01-12-2021

Not reproducible in mach5 headful testing or locally.
27-11-2019

Test passed when run in standalone mode in jdk9,8. Seems to failing only when run from top level. Probably a test execution issue.
02-01-2017