RFR: JDK-8298104: NPE on synchronizeSceneNodes()

John Hendrikx jhendrikx at openjdk.org
Fri May 5 07:57:25 UTC 2023


On Wed, 3 May 2023 11:46:50 GMT, buedi <duke at openjdk.org> wrote:

> A null pointer exception occurs on the ScenePulseListener when iterating through the dirty node list.
> A null check is needed on the node before calling node.getScene().
> 
> The error occurs occasionally and causes the application to crash.

I've looked a bit through the JavaFX bugs, and I noticed that many problems involving `synchronizeSceneNodes` are caused by modifying the SceneGraph outside the FX thread which would sometimes throw `ConcurrentModificationException`. As you see this problem only occasionally, it's a pretty good fit.  It might be worthwhile to check your logs for such an exception (or similar, like `IndexOutOfBoundsException`).

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

PR Comment: https://git.openjdk.org/jfx/pull/1123#issuecomment-1535874797


More information about the openjfx-dev mailing list