JDK-6847155 : test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Extra.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-06-02
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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
7 b114Fixed
Related Reports
Relates :  
Description
The test fails on linux-i586, Gnome/Metacity 2.24 with the current JDK 7 (~ b59):
The test also leaves a modifier key (Shift) in the pressed state.
The .jtr file is attached.

----------System.err:(20/1458)----------
java.lang.RuntimeException: Test failed :  Pressed. modifiersEx != curStandardExModifiers
	at MessageLogger.reportError(MouseModifiersUnitTest_Extra.java:487)
	at MouseModifiersUnitTest_Extra.checkPressedModifiersTest(MouseModifiersUnitTest_Extra.java:59)
	at CheckingModifierAdapter.mousePressed(MouseModifiersUnitTest_Extra.java:450)
	at java.awt.Component.processMouseEvent(Component.java:6267)
	at java.awt.Component.processEvent(Component.java:6035)
	at java.awt.Container.processEvent(Container.java:2084)
	at java.awt.Window.processEvent(Window.java:1930)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2142)
	at java.awt.Window.dispatchEventImpl(Window.java:2612)
	at java.awt.Component.dispatchEvent(Component.java:4456)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed :  Pressed. modifiersEx != curStandardExModifiers
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed :  Pressed. modifiersEx != curStandardExModifiers


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed :  Pressed. modifiersEx != curStandardExModifiers

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/6847155.1
30-08-2010

EVALUATION Tried this scenario manually and generated modifiers are valid. The problem appears to be in the test itself. It calculates some expected and put it into the array (we hold a number of values for every mouse button). But it use values from the same array so far at some moment it modifies a cell and then use that modified value for further calculation. That look like a typo in the test.
30-08-2010

EVALUATION The 6848336 is more about excluding the test ModHighBitsTest.html so that fix won't make this one to disappear. I tried test under ubuntu and it fails on the first extra button with SHIFT modifier. The problem is that the MouseEvent for the fourth button have modifiersEx="button4" although it's expected to have "button4+shift". testSHIFT() => 16384 PRESSED java.awt.event.MouseEvent[MOUSE_PRESSED,(100,100),absolute(100,124),button=4,extModifiers=Button4,clickCount=1] on frame0 Button = 4Modifiers = 0standard = 0 Button = 4ModifiersEx = 16384standardEx = 16448 MEvent. CASE! MEvent. CASE! testSHIFT() => 32768 ----------System.err:(20/1457)---------- java.lang.RuntimeException: Test failed : Pressed. modifiersEx != curStandardExModifiers at MessageLogger.reportError(MouseModifiersUnitTest_Extra.java:487) at MouseModifiersUnitTest_Extra.checkPressedModifiersTest(MouseModifiersUnitTest_Extra.java:59) at CheckingModifierAdapter.mousePressed(MouseModifiersUnitTest_Extra.java:450) at java.awt.Component.processMouseEvent(Component.java:6431) at java.awt.Component.processEvent(Component.java:6199) at java.awt.Container.processEvent(Container.java:2203) at java.awt.Window.processEvent(Window.java:1974) at java.awt.Component.dispatchEventImpl(Component.java:4790) at java.awt.Container.dispatchEventImpl(Container.java:2261) at java.awt.Window.dispatchEventImpl(Window.java:2671) at java.awt.Component.dispatchEvent(Component.java:4616) at java.awt.EventQueue.dispatchEvent(EventQueue.java:662) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:209) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:118) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed : Pressed. modifiersEx != curStandardExModifiers
20-08-2010

EVALUATION Apparently, the problem is a duplicate of 6848336. Will need to check if the failure still occurs when 6848336 is fixed.
24-07-2009