Skip to content

8382049: [TestBug] Multiple StubToolkit checks in JavaFX production code#2146

Closed
Maran23 wants to merge 2 commits into
openjdk:masterfrom
Maran23:stubtoolkit-leak-prod
Closed

8382049: [TestBug] Multiple StubToolkit checks in JavaFX production code#2146
Maran23 wants to merge 2 commits into
openjdk:masterfrom
Maran23:stubtoolkit-leak-prod

Conversation

@Maran23

@Maran23 Maran23 commented Apr 12, 2026

Copy link
Copy Markdown
Member

This PR removes all StubToolkit checks from JavaFX production code.
There are only a few.

Two notes:

Note 1: TableRowSkinBases DO_ANIMATIONS is now true for tests. It was not before due to a leak (as far as I could find when digging JDK-8120657). But I could not find any problem, even running all tests with -Xmx512m
Checking tests that trigger the affected code path and creating a heapdump after, I could not see anything weird:

Heapdump after TreeTableViewResizeTest:

image image

Note 2: Now when the tests run in CI, JavaFX: using test.com.sun.javafx.pgstub.StubToolkit is now printed 12 times (probably the amount of Unit Test Threads):
image
If this is a problem, we can decide if we want to change the print code in Toolkit (in a follow-up).
-> Changed to System.out in this PR.



Progress

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

Issue

  • JDK-8382049: [TestBug] Multiple StubToolkit checks in JavaFX production code (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2146

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2146.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Apr 12, 2026

Copy link
Copy Markdown

👋 Welcome back mhanl! 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

openjdk Bot commented Apr 12, 2026

Copy link
Copy Markdown

@Maran23 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8382049: [TestBug] Multiple StubToolkit checks in JavaFX production code

Reviewed-by: angorya, mstrauss, lkostyra

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 28 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

Comment thread modules/javafx.graphics/src/test/java/test/com/sun/javafx/pgstub/StubToolkit.java Outdated
@openjdk openjdk Bot added the rfr Ready for review label Apr 12, 2026
@mlbridge

mlbridge Bot commented Apr 12, 2026

Copy link
Copy Markdown

Webrevs

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

/reviewers 2

@openjdk

openjdk Bot commented Apr 13, 2026

Copy link
Copy Markdown

@andy-goryachev-oracle
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

Re: TableRowSkinBases and DO_ANIMATIONS - there were quite a few memory leak fixes implemented recently (er, 2024), so enabling animations is likely to be ok (especially if it does not fail any headful CI runs).

Tickets in question:
https://bugs.openjdk.org/browse/JDK-8341687
https://bugs.openjdk.org/browse/JDK-8320232
https://bugs.openjdk.org/browse/JDK-8323543
https://bugs.openjdk.org/browse/JDK-8307538

@Maran23

Maran23 commented Apr 13, 2026

Copy link
Copy Markdown
Member Author

Re: TableRowSkinBases and DO_ANIMATIONS - there were quite a few memory leak fixes implemented recently (er, 2024), so enabling animations is likely to be ok (especially if it does not fail any headful CI runs).

I had the same thought.
And if there is a problem only in the headless tests, we can still decide to disable the animations for headless tests with e.g. a System Property or similar.
But since other Controls also use Animations (Pagination, TitledPane, TabPane (Tab close)) and no issue there, I think this is fine.

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am running CI builds, will update on the result. the code changes look good.

Comment thread modules/javafx.graphics/src/test/java/test/com/sun/javafx/pgstub/StubToolkit.java Outdated
@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

Out CI runs are all green.

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you! lgtm

@kevinrushforth kevinrushforth self-requested a review April 14, 2026 15:59
@bridgekeeper

bridgekeeper Bot commented May 12, 2026

Copy link
Copy Markdown

@Maran23 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 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!

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

sorry for letting this PR auto-expire. please re-open.

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

@lukostyra could you be the second reviewer please?

Comment thread modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java
@openjdk openjdk Bot added the ready Ready to be integrated label May 27, 2026

@lukostyra lukostyra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Ran both local and CI testing and everything looks good.

@Maran23

Maran23 commented May 27, 2026

Copy link
Copy Markdown
Member Author

/integrate

@openjdk

openjdk Bot commented May 27, 2026

Copy link
Copy Markdown

Going to push as commit 58a7bea.
Since your change was applied there have been 28 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label May 27, 2026
@openjdk openjdk Bot closed this May 27, 2026
@openjdk openjdk Bot removed ready Ready to be integrated rfr Ready for review labels May 27, 2026
@openjdk

openjdk Bot commented May 27, 2026

Copy link
Copy Markdown

@Maran23 Pushed as commit 58a7bea.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@Maran23 Maran23 deleted the stubtoolkit-leak-prod branch July 3, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants