JDK-8144074 : [PIT] Crash calling Toolkit.getScreenSize() on Windows.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-11-25
  • Updated: 2016-02-05
  • Resolved: 2015-12-03
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 9
9 b96Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
SQE (Yuri) reported a crash in a test called TextDrawer but
it is unrelated to text. It does not get that far :

This one line program crashes the JDK on Windows :
public class GSS {
    public static void main(String s[]) {
        java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    }

} 

Seen so far with 64 bit JRE on WIndows 7 but probably not
limited to that,
Comments
awt_Toolkit.cpp getScreenWidth now depends on the GraphicsDevices being already intialised as seen below. -- 2360 Devices::InstanceAccess devices; 2361 AwtWin32GraphicsDevice *device = devices->GetDevice( 2362 AwtWin32GraphicsDevice::GetDefaultDeviceIndex()); 2363 2364 return (device == NULL) ? width : device->ScaleDownX(width); --- I do not know off hand if this introduces a circular dependency in some other code path but we seem to need to ensure devices are initialised but I have a fix that does this that solves the crash.
25-11-2015

My initial guess is that it is a regression due to "8073320 Windows HiDPI Graphics support" since that is the fix that touched the most related code.
25-11-2015