United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6568560 Regression testcase java/awt/FullScreen/UninitializedDisplayModeChangeTest fails from 6u2 b01
JDK-6568560 : Regression testcase java/awt/FullScreen/UninitializedDisplayModeChangeTest fails from 6u2 b01

Details
Type:
Bug
Submit Date:
2007-06-12
Status:
Resolved
Updated Date:
2008-02-06
Project Name:
JDK
Resolved Date:
2007-06-30
Component:
client-libs
OS:
windows_vista,windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6,6u2
Fixed Versions:
6u4 (b01)

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
Regression testcase java/awt/FullScreen/UninitializedDisplayModeChangeTest fails starting from build 6u2 b01, on Windows platform. It throws the following exception:

java.lang.NullPointerException 
       at sun.awt.Win32GraphicsEnvironment.displayChanged(Win32GraphicsEnvironment.java:116)
       at sun.awt.windows.WToolkit$4.run(WToolkit.java:755)
       at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
       at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
       at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

                                    

Comments
EVALUATION

The regression is caused by the fix for 
  4417798: Need to track add/remove of monitors on display changes

We should have checked if 'screens' is null prior to using it
in Win32GraphicsEnvironment.displayChanged().

The same regression is present in the current jdk7 build.
                                     
2007-06-12
WORK AROUND

Call GraphicsEnvironment.getScreenDevices() prior to changing
display modes.
                                     
2007-06-12
SUGGESTED FIX

http://javaweb.sfbay/jcg/6u3/2D/6568560/
                                     
2007-06-15



Hardware and Software, Engineered to Work Together