-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8213531: Test javax/swing/border/TestTitledBorderLeak.java fails #8450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
Webrevs
|
Does it mean that setVisible(true) cause some memory leak since it prevents the window to be disposed? |
Since 9 windows are freed .. I doubt it .. but what's the hold up with #10 ? |
Then why we delete the "setVisible(true)"? probably we leak the latest visible window? |
I dont think this is related to TitledBorder fix done in JDK-8204963.
so I think it's a generic JFrame dispose issue with CleanerFactory in linux (last JFrame is not cleaned up by CleanerFactory) which can be worked upon in a separate PR. As I see, TitledBorder leak is fixed and there's no point having the test problemlisted for linux due to JFrame issue. |
|
Can you confirm we still need the Frame ? I mean when does the used-to-be-leaky listener get installed ? |
No, we dont need the frame. The leaky listener gets installed when we call The test is made headless which still fails without the fix and passes with TitledBorder fix and also pass in all CI headless platforms |
|
@prsadhuk 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: 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 530 new commits pushed to the
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 |
So it means that the last visible but already disposed frame is sitting in the memory/leaked and this test catch that, isn't it? |
|
/integrate |
|
Going to push as commit 07d2450.
Your commit was automatically rebased without conflicts. |
|
Have raised JDK-8287707 for JFrame leak but it is seem playing around with Thread.sleep, the freed count varies from 7-9 so it can be a test issue too. |
Test was failing in linux citing
java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd
there was no platform specific code done for the fix and logs in
TitledBorder.installPropertyChangeListenersshows it was called 10 times for the test butCleanerFactory.cleaner().registeraction was only called 9 times in linux causing it to fail.Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations.
Also removed the deprecated
System.runFinalizationProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8450/head:pull/8450$ git checkout pull/8450Update a local copy of the PR:
$ git checkout pull/8450$ git pull https://git.openjdk.java.net/jdk pull/8450/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8450View PR using the GUI difftool:
$ git pr show -t 8450Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8450.diff