-
Notifications
You must be signed in to change notification settings - Fork 541
8232824: Removing TabPane with strong referenced content causes memory leak from weak one #79
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
… memory leak from weak one
|
👋 Welcome back arapte! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
@arapte - This bug looks like a good candidate for JavaFX 14. Can you retarget this PR to the jfx14 branch? |
|
This will need a second reviewer. @aghaisas can you review this, too? |
Thanks for guiding Kevin, PR is now targeted to jfx14. |
|
The fix looks good. I'll take a closer look at the unit test later. Speaking of tests...since the addition of the |
Hello Kevin, |
Did you run a pulse? That would be needed in order to sync the changes down to the peer. In any event, it is fine to use a system test if you can't get it to fail with a unit test. I have three cleanup comments that apply to both of the new tests. The first is the most important of these.
|
Yes Kevin, I had tried using Have updated the PR to fix the other review comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
@arapte This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 40 commits pushed to the ➡️ To integrate this PR with the above commit message, type |
|
/reviewers 2 |
|
@kevinrushforth |
|
/integrate |
|
@arapte The following commits have been pushed to jfx14 since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 79fc0d0. |
|
Mailing list message from Ambarish Rapte on openjfx-dev: Changeset: 79fc0d0 8232824: Removing TabPane with strong referenced content causes memory leak from weak one Reviewed-by: kcr, aghaisas ! modules/javafx.graphics/src/main/java/javafx/scene/Parent.java |
|
Mailing list message from Ambarish Rapte on openjfx-dev: Changeset: 79fc0d0 8232824: Removing TabPane with strong referenced content causes memory leak from weak one Reviewed-by: kcr, aghaisas ! modules/javafx.graphics/src/main/java/javafx/scene/Parent.java |
This PR is a fix for JDK-8232824
This issue is regression of JDK-8187074.
Issue.
Parent.viewOrderChildrenis a list of children sorted according to view order.Parent.viewOrderChildrenis cleared and computed inParent.computeViewOrderChildren()which is called fromParent.doUpdatePeer()when apulseis received.Below is the scenario mentioned in this issue,
TabPaneis created with fewtabs.TabHeaderSkinis created withsetViewOrder(1)and is added toTabHeaderArea.headersRegionTabHeaderSkins are added toParent.viewOrderChildrenonpulse.TabPaneis removed from scene, then on the next pulse the methodParent.doUpdatePeer()does not get called forTabHeaderArea.headersRegion, because it is not part for scenegraph anymore.So
Parent.computeViewOrderChildren()does not get called and theParent.viewOrderChildrendoes not get cleared, which causes the leak.Fix:
Clear the
Parent.viewOrderChildrenlist when markingDirtyBits.PARENT_CHILDREN_VIEW_ORDERas dirty.Parent.viewOrderChildrenwill be computed on nextpulse.This will maintain lazy computation of
Parent.viewOrderChildren.Added a system test, fails without fix and passes with. No failures in existing tests.
Progress
Issue
JDK-8232824: Removing TabPane with strong referenced content causes memory leak from weak one
Approvers