The application has a "current progress" screen consisting of a number of text boxes and tableviews. Incoming data is processed in a separate thread and stored in a database. When processing is finished, it toggles a SimpleBooleanProperty.
On the Java FX thread, I attach a change listener to the property. On change, I call an update routine that queries the database and updates the current progress screen.
Sometimes, the display just stops updating. My logs show the following exception:
30-08-18 09:04:15.781 ERROR java.lang.Throwable - Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
30-08-18 09:04:15.781 ERROR java.lang.Throwable - at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2289)
30-08-18 09:04:15.781 ERROR java.lang.Throwable - at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2419)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.Toolkit.lambda$runPulse$29(Toolkit.java:398)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at java.security.AccessController.doPrivileged(Native Method)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:397)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:424)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$403(QuantumToolkit.java:319)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
30-08-18 09:04:15.782 ERROR java.lang.Throwable - at java.lang.Thread.run(Unknown Source)
There is no indicator here as to where in my program things have gone wrong. I've tried to duplicate the issue without success.
Anyone have any thoughts on what this could be or how to troubleshoot it?
EDIT: The "progess screen" shows incoming and outgoing network messages and queries a database to update several fields on the screen. In all the examples I've seen, the background thread is started from the JavaFX main thread, but in this case the background thread (a server) is started before the JavaFX thread. I want to trigger the update of the JavaFX thread on a message incoming to the server thread.