RFR: 8282270: java/awt/Robot Screen Capture tests fail after 8280861

Maxim Kartashev duke at openjdk.java.net
Wed Mar 9 09:49:03 UTC 2022


On Tue, 8 Mar 2022 16:10:02 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>>> > I submitted a job for testing the changes.
>>> 
>>> Thanks a lot!
>> 
>> I got 1 failure out of 15 on Linux for `java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java`. The screenshot of the entire screen has no open windows: just plain desktop background. It was probably captured after the test was shutdown.
>> 
>> The test doesn't save the captured image on failure, does it?
>> 
>> It's crucial to save the captured images, otherwise we're blind and left to guess what Robot captured and why it didn't match.
>
>> @aivanov-jdk Could you please re-run the test? Thanks once more!
> 
> Sorry for my delayed reply.
> 
> One failure reported:
> 
> command: main -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2 HiDPIRobotScreenCaptureTest
> ...
> ----------System.out:(3/218)----------
> Creating screen capture of java.awt.Rectangle[x=83,y=97,width=400,height=300]
> Checking (100, 75) to have color java.awt.Color[r=0,g=255,b=0]
> ... Mismatch: found java.awt.Color[r=135,g=8,b=69] instead. Check image.png.
> ----------System.err:(12/723)----------
> java.lang.RuntimeException: Wrong image color!
> 	at HiDPIRobotScreenCaptureTest.checkRectColor(HiDPIRobotScreenCaptureTest.java:125)
> 	at HiDPIRobotScreenCaptureTest.main(HiDPIRobotScreenCaptureTest.java:108)
> ...
> 
> ![The captured image.png](https://user-images.githubusercontent.com/70774172/157277072-febab0d6-bef3-43df-a98f-8b6b6eea60ff.png)
> 
> The checked point (x, y) = (100, 75) is 10 pixels into the green square but it's 55 pixels above the square.

@aivanov-jdk Thanks for re-running the test. Where does this failure come from - Linux or Windows? The saved image's size is correct (400x300 px), but I can't explain the location of the painted area inside it and why it is so small...

-------------

PR: https://git.openjdk.java.net/jdk/pull/7613



More information about the client-libs-dev mailing list