JDK-8253398 : Toolkit.getScreenInsets() returns wrong value for some screens
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 11.0.8-oracle,14.0.2,15,16
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_10
  • CPU: generic
  • Submitted: 2020-09-21
  • Updated: 2020-09-30
  • Resolved: 2020-09-29
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
The test java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails on Windows with the following output:

#section:main
----------messages:(5/198)----------
command: main ScreenInsetsTest
reason: User specified action: run main ScreenInsetsTest 
Mode: othervm
Additional options from @modules: --add-modules java.desktop
elapsed time (seconds): 0.71
----------configuration:(3/43)----------
Boot Layer
  add modules: java.desktop

----------System.out:(0/0)----------
----------System.err:(16/1198)----------
Wrong insets for GraphicsConfig: D3DGraphicsConfig[dev=D3DGraphicsDevice[screen=0],pixfmt=0]
	Expected: java.awt.Insets[top=0,left=0,bottom=0,right=0]
	Actual: java.awt.Insets[top=0,left=0,bottom=40,right=0]
java.lang.RuntimeException: TEST FAILED: Toolkit.getScreenInsets() returns wrong value for some screens
	at ScreenInsetsTest.main(ScreenInsetsTest.java:116)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: Toolkit.getScreenInsets() returns wrong value for some screens
JavaTest Message: shutting down test

Reproducibility: 100%
How to reproduce:

> java -jar jtreg\lib\jtreg.jar -testjdk:<path_to_jdk> test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java

The issue was observed on 16-ea+16-712, 15+36-1562, 14.0.2+12-46, 11.0.8+10-LTS
Comments
I was confused by the fact that the original issue JDK-6829250 was submitted against Windows_XP x86 and it affected 7,8,9. Sorry for that.
30-09-2020

The test is problem listed, how did you run it? java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all
29-09-2020