-
Bug
-
Resolution: Won't Fix
-
P4
-
7, 8
-
arm
-
linux
The test Access_JTreg/Automated/test/javax/swing/JPopupMenuTest.java fails with the following exception:
[2015-04-13T02:05:26.37] java.lang.NullPointerException
[2015-04-13T02:05:26.37] at JPopupMenuTest.start(JPopupMenuTest.java:125)
[2015-04-13T02:05:26.37] at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
[2015-04-13T02:05:26.37] at java.lang.Thread.run(Unknown Source)
[2015-04-13T02:05:26.37] STATUS:Failed.Applet thread threw exception: java.lang.NullPointerException
Reproducible: Very rarely
Is it a Regression: Not sure. I wasn't able to reproduce the issue on 8u33 b05, however, the first time it appeared was 8 b20.
Steps to reproduce: (On Linux) Run the following command and wait till the test fails:
while true; do DISPLAY=:0 java com.sun.javatest.regtest.AppletWrapper JPopupMenuTest.java/JPopupMenuTest.aarg; done
I found that the test don't handle any exceptions in the method start() and this makes it impossible to obtain the error report. Here's a snippet from the test code:
public void start() {
try { Thread.sleep(3000); } catch (Exception e) {}
activatePopupMenuRobotically();
AccessibleContext ac = comp.getAccessibleContext();
/*******************************************************
* AccessibleContext methods.
*******************************************************/
if(ac == null) {
addFailure("getAccessibleContext returned null!");
}
...
// AccessibleValue
AccessibleValue aval = ac.getAccessibleValue();
if(aval != null) {
addFailure("getAccessibleValue should not return a non-null value");
}
report();
}
As it shown above, there's no chance to get the message 'getAccessibleContext returned null!'. The report method will never be invoked due to NPE occurring right before it's called. I put the report method into finally block and got the following message:
java.lang.RuntimeException: JPopupMenuTest test failed:
getAccessibleParent should not return null because this JPopupMenu has the parents
at BaseTestUtil.report(BaseTestUtil.java:89)
at JBaseTest.report(JBaseTest.java:24)
at JPopupMenuTest.start(JPopupMenuTest.java:197)
at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
at java.lang.Thread.run(Unknown Source)
[2015-04-13T02:05:26.37] java.lang.NullPointerException
[2015-04-13T02:05:26.37] at JPopupMenuTest.start(JPopupMenuTest.java:125)
[2015-04-13T02:05:26.37] at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
[2015-04-13T02:05:26.37] at java.lang.Thread.run(Unknown Source)
[2015-04-13T02:05:26.37] STATUS:Failed.Applet thread threw exception: java.lang.NullPointerException
Reproducible: Very rarely
Is it a Regression: Not sure. I wasn't able to reproduce the issue on 8u33 b05, however, the first time it appeared was 8 b20.
Steps to reproduce: (On Linux) Run the following command and wait till the test fails:
while true; do DISPLAY=:0 java com.sun.javatest.regtest.AppletWrapper JPopupMenuTest.java/JPopupMenuTest.aarg; done
I found that the test don't handle any exceptions in the method start() and this makes it impossible to obtain the error report. Here's a snippet from the test code:
public void start() {
try { Thread.sleep(3000); } catch (Exception e) {}
activatePopupMenuRobotically();
AccessibleContext ac = comp.getAccessibleContext();
/*******************************************************
* AccessibleContext methods.
*******************************************************/
if(ac == null) {
addFailure("getAccessibleContext returned null!");
}
...
// AccessibleValue
AccessibleValue aval = ac.getAccessibleValue();
if(aval != null) {
addFailure("getAccessibleValue should not return a non-null value");
}
report();
}
As it shown above, there's no chance to get the message 'getAccessibleContext returned null!'. The report method will never be invoked due to NPE occurring right before it's called. I put the report method into finally block and got the following message:
java.lang.RuntimeException: JPopupMenuTest test failed:
getAccessibleParent should not return null because this JPopupMenu has the parents
at BaseTestUtil.report(BaseTestUtil.java:89)
at JBaseTest.report(JBaseTest.java:24)
at JPopupMenuTest.start(JPopupMenuTest.java:197)
at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
at java.lang.Thread.run(Unknown Source)