RFR: JDK-8298104: NPE on synchronizeSceneNodes()
Daniel
duke at openjdk.org
Fri Dec 22 10:22:52 UTC 2023
On Wed, 3 May 2023 11:46:50 GMT, Daniel <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.
>
> Issue: [JDK-8298104: NPE on synchronizeSceneNodes()](https://bugs.openjdk.org/browse/JDK-8298104)
Hi John,
I've been working on moving our project from Java 8 to Java 17 and JavaFX 21 for the past month. But I can't seem to fix a bug that keeps showing up, even after running the applications for over 10 days on JavaFX version 21.0.1.
Now, I'm having trouble compiling javafx-graphics for Windows. Any ideas on how to figure out what's causing the problem?
best regards,
Daniel

2023-12-15 11:00:37,026 ERROR [JavaFX Application Thread] c.m.a.e.AdviseUncaughtExceptionHandler [?:?] AdviseUncaughtExceptionHandler uncaughtException detects NullPointerException
2023-12-15 11:00:37,026 ERROR [JavaFX Application Thread] c.m.a.e.AdviseUncaughtExceptionHandler [?:?] NullPointerException =>
java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2483)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2630)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:401)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:400)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:430)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:592)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:572)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:565)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:352)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185)
at java.base/java.lang.Thread.run(Thread.java:840)
2023-12-15 11:00:37,027 ERROR [JavaFX Application Thread] c.m.a.e.AdviseUncaughtExceptionHandler [?:?] Exception
java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2483)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2630)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:401)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:400)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:430)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:592)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:572)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:565)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:352)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185)
at java.base/java.lang.Thread.run(Thread.java:840)
2023-12-15 11:00:37,029 ERROR [JavaFX Application Thread] c.m.a.e.AdviseUncaughtExceptionHandler [?:?] BÄÄHHMM, get more informations => java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2483)
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1123#issuecomment-1867506290
More information about the openjfx-dev
mailing list