Skip to content

Conversation

@DamonGuy
Copy link
Contributor

@DamonGuy DamonGuy commented Aug 21, 2025

Ubuntu machine has multiple failing java awt tests. When looking at the screenshots of the desktop when each test fails, a white square can be seen at the top-left of the desktop.

Screenshot 2025-08-20 at 10 06 37 AM

This seems to be similar to the white square that FrameVisualTest.java creates so the frame was not disposed of properly during this failure. I have tried re-creating this failure on Ubuntu 22.04, similar to the failure OS that this originally occurred on, to no avail. I ran this test individually, and with all of the listed failing tests back-to-back but all the tests pass as normal. This stabilization fix to the test attempts to prevent this in case it occurs again.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8360160: ubuntu-22-04 machine is failing client tests (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26871/head:pull/26871
$ git checkout pull/26871

Update a local copy of the PR:
$ git checkout pull/26871
$ git pull https://git.openjdk.org/jdk.git pull/26871/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26871

View PR using the GUI difftool:
$ git pr show -t 26871

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26871.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 21, 2025

👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 21, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Aug 21, 2025

@DamonGuy The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added client client-libs-dev@openjdk.org rfr Pull request is ready for review labels Aug 21, 2025
@mlbridge
Copy link

mlbridge bot commented Aug 21, 2025

Webrevs

robot.delay(1000);
System.out.println("frames.length: "+frames.length);

System.out.println("frames.length: " + frames.length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that the root cause of this failure is the same as in the JDK-8280987 - spawning a log of windows at once, like one or two hundred. This is still happening with the updated test in the createAndShowUI().

I guess they should either be shown in batches (of 20 windows, for example) with a delay between each batch to give the system time to handle them or the number of tested graphics configurations should be reduced.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see I misunderstood slightly from when you previously brought this up. Thanks for the info! I can do this in batches and show these side by side instead.

I was able to recreate the failure now in ubuntu 22.04 and it crashes with 210 open windows at once (due to having many gcs detected). I'll update this PR with this change next.

d = frames[index].getSize();
});
Rectangle rect = new Rectangle(p, d);
BufferedImage img = robot.createScreenCapture(rect);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if the current and previous implementations of the test are really helpful.

Note the very dark window shadow in the screenshot of the PR description. These are the overlapping shadows of multiple windows placed on top of each other.
It seems that at the time of writing, the test expected that the system would arrange the windows next to each other, but this is no longer the case.

In the test, we try to get the same bounds for each window because they are stacked on top of each other. However, this means that we only check the top window multiple times, which is not useful.

I think we should place the windows across the entire screen and take a screenshot of each one. Considering there may be many windows, this may need to be done in several batches.

@DamonGuy DamonGuy marked this pull request as draft September 2, 2025 02:45
@openjdk openjdk bot removed the rfr Pull request is ready for review label Sep 2, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 28, 2025

@DamonGuy This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants