JDK-7048568 : Crash in Java_sun_awt_Win32GraphicsEnvironment_isVistaOS
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2011-05-26
  • Updated: 2011-07-05
  • Resolved: 2011-06-30
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 b146Fixed
Related Reports
Relates :  
Relates :  
Description
SQE team still observe the crash alike to 7042429 with jdk7b143 on Windows7_x86.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/7048568/
07-06-2011

EVALUATION IE sends WM_SETTINGCHANGE (see links in comments) thus forces the AwtWin32GraphicsDevice::ResetAllMonitorInfo() which dereferences the null ptr and then crashes. This is alike the 7042429 and we may prevent the list from accessing with 1) if (!Devices::GetInstance()){...} That's the fix sample: http://spbweb.russia.sun.com/~ad153231/webrev_devicelist_0/index.html Bad thing is that this approach only fixes only one particular case but there are a number of other places within awt_Win32GraphicsDevice.cpp using the same pattern. 2) From the other hand it's known what IE sends with that so one can filter that out as a junk message and don't bother processing it. The fix is: http://spbweb.russia.sun.com/~ad153231/webrev_devicelist_1/index.html This solution is only protecting from IE specifics but not from (very hopothetical) others. Say if user changes environment variable or desktop parameters, etc. we still will handle that message and possibly crash.
01-06-2011

EVALUATION The crash occur somewhere in awt_Win32GraphicsDevice.cpp in particular while running the AwtWin32GraphicsDevice::ResetAllMonitorInfo() method which is trying to query the number of devices with devices->GetNumDevices() while they are not yet initialized. This is more likely a result of 7002839 which now prevents Win32GraphicsEnv from initializing some native resources. We do ResetAllMonitorInfo() in result of massive WM_SETTINGCHANGE messages seem generated on IE closing and I don't see such a thing with FF.
31-05-2011