<AWT Dev> RFR: 8144074: [PIT] Crash calling Toolkit.getScreenSize() on Windows.

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Nov 25 20:19:04 UTC 2015

Hi, Phil.
Is it possible that the code in the Devices::UpdateInstance assume that 
some other initialization should be done before? For example the 
initializations steps in the Win32GraphicsEnvironment.java:

         // Ensure awt is loaded already.  Also, this forces static init
         // of WToolkit and Toolkit, which we depend upon
         // setup flags before initializing native layer

->>>> then in native
     // This method needs to be called prior to any display-related activity

It seems that in your fix device will be initialized before 
initFlags()/SetProcessDPIAwareProperty/DWMIsCompositionEnabled, right?

On 25.11.15 22:39, Phil Race wrote:
> This resolves a crash on WIndows startup due to changes in the hidpi
> support
> that requires the graphics devices be initialised first in order to get
> screen dimensions.
> http://cr.openjdk.java.net/~prr/8144074/
> https://bugs.openjdk.java.net/browse/JDK-8144074
> -phil.

Best regards, Sergey.

More information about the awt-dev mailing list