RFR: 8269907 memory leak - Dirty Nodes / Parent removed [v4]

Florian Kirmaier fkirmaier at openjdk.java.net
Thu Dec 9 12:50:04 UTC 2021


On Thu, 9 Dec 2021 12:45:32 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

>> After thinking about this issue for some time, I've now got a solution.
>> I know put the scene in the state it is, before is was shown, when the dirtyNodes are unset, the whole scene is basically considered dirty.
>> This has the drawback of rerendering, whenever a window is "reshown", but it restores sanity about memory behaviour, which should be considered more important.
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>
>   JDK-8269907
>   Fixed rare bug, causing bounds to be out of sync.

If found a bug in the current implementation and fixed it - which took quite long.
It seems like, calling synchronizeSceneNodes without calling updateBounds() can cause that the NGNode can get out of sync. Which then caused rendering bugs with disappearing objects.

This is now fixed.

I've also added a call to the `syncLights` and `synchronizeSceneProperties` methods.
I think it's less complex to just sync everything, instead of just syncing a subset - also when making a snapshot.

Maybe it would make sense to add a check like the following, to the doUpdatePeer() method?

if(txBoundsInvalid) {
PlatformLogger logger = Logging.getInputLogger();
if (logger.isLoggable(Level.WARN)) {
logger.finer("txBoundsInvalid ot of sync on doUpdatePeer");
}
}

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

PR: https://git.openjdk.java.net/jfx/pull/584


More information about the openjfx-dev mailing list