JDK-7149068 : java/awt/Window/Grab/GrabTest.java failed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-02-27
  • Updated: 2013-09-05
  • Resolved: 2012-08-14
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 7 JDK 8
7u40Fixed 8 b51Fixed
Related Reports
Relates :  
Relates :  
Description
new regression test java/awt/Window/Grab/GrabTest.java failed on linux, solaris and windows platforms since jdk 7 fcs

log out for solaris and linux:
----------System.out:(8/811)----------
java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Press,when=1329523082569,modifiers=Button1] on button0
java.awt.event.MouseEvent[MOUSE_PRESSED,(100,100),absolute(400,200),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on win0
java.awt.event.MouseEvent[MOUSE_PRESSED,(100,100),absolute(100,100),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on frame0
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
----------System.err:(15/771)----------
Failure: [7] Window disposal didn't cause ungrab
java.lang.RuntimeException: Test failed.
	at GrabTest.test(GrabTest.java:202)
	at GrabTest.main(GrabTest.java:111)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:96)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed.
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed.
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed.


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed.



log out for windows:
----------System.out:(8/812)----------
java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Press,when=1330340765828,modifiers=] on button0
java.awt.event.MouseEvent[MOUSE_PRESSED,(100,100),absolute(400,200),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on win0
java.awt.event.MouseEvent[MOUSE_PRESSED,(100,100),absolute(100,100),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on frame0
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
sun.awt.UngrabEvent[java.awt.Window[win0,300,100,200x200,layout=java.awt.FlowLayout]]
----------System.err:(15/796)----------
Failure: [6] Press on the outside area didn't cause ungrab
java.lang.RuntimeException: Test failed.
	at GrabTest.test(GrabTest.java:202)
	at GrabTest.main(GrabTest.java:111)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:96)
	at java.lang.Thread.run(Thread.java:722)

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/80b1ecc79852
14-08-2012

EVALUATION The suggested fix completely resolves the problem.
24-07-2012

EVALUATION Looks like an issue in the test. The attached suggested fix allows the test to pass. But I still see an error message "Error: Frame can't be focused".
24-07-2012

SUGGESTED FIX diff -r c0685695b591 test/java/awt/Window/Grab/GrabTest.java --- a/test/java/awt/Window/Grab/GrabTest.java Mon May 21 15:42:08 2012 -0700 +++ b/test/java/awt/Window/Grab/GrabTest.java Tue Jul 24 17:14:45 2012 +0400 @@ -65,7 +65,7 @@ }, sun.awt.SunToolkit.GRAB_EVENT_MASK); f = new Frame("Frame"); - f.setSize(200, 200); + f.setSize(300, 300); f.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { System.out.println(e); @@ -176,6 +176,7 @@ // 6. Check that press on the outside area causes ungrab Point loc = f.getLocationOnScreen(); robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 300); + Util.waitForIdle(robot); robot.mousePress(InputEvent.BUTTON1_MASK); robot.delay(50); robot.mouseRelease(InputEvent.BUTTON1_MASK);
24-07-2012

EVALUATION As the test is new, this is not a regression. Suppose that we could postpone it to 7u6 (nothing critical).
29-02-2012

EVALUATION The problem is reproducible indeed. The test is written for 7124430. In a suggeted fix section for the 7124430 it is noticed that thefix is Mac OS specific. I am reassining the issue to the re of 7124430.
27-02-2012