<AWT Dev>  Fix for JDK-8159956 : EXCEPTION_ACCESS_VIOLATION in sun.awt.windows.ThemeReader.getThemeMargins
ajit.ghaisas at oracle.com
Mon Jul 11 10:04:06 UTC 2016
This is the fix for JVM crash bug.
Root Cause :
newInsets() method in java.desktop/windows/native/libawt/windows/ThemeReader.cpp file tries to access AwtToolkit::insetsMID method id.
In awt headless mode, this method id is not initialized. Trying to access it results in JVM crash.
Creating an object of 'Insets' class is allowed in awt headless mode. (Refer to existing test - test/java/awt/Insets/HeadlessInsets.java)
AwtToolkit::insetsMID method is a handle to the constructor of Insets class.
The fix for this bug is to Initialize the AwtToolkit::insetsMID even in awt headless mode.
This is achieved by invoking native method initIDs() from Toolkit.java static initializer block - this was avoided in headless mode using a check. I have removed this check.
Request you to review.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev