Java / JavaFX exception - how to detect an error

So, I get an exception, and none of my codes are listed in it.

Is there a simple (quick, easy) way to determine if the problem is in my code or if it (maybe not) is there possibly a bug in Java, in this case JavaFX?

My code is a wrapper for a long script (Lua script), which in itself (Lua script) accesses Bash scripts if this information is used.

The exception looks pretty easy to reproduce by clicking on the screen while a certain part of the scripts is working - I think that when it is fired twice by both Lua and Bash - in fact, (I have a stream, Runnable, which reads the output stream from the Lua script , and I usually have full control over my JavaFX GUI, logging results from scripts, etc., except, of course, after this exception occurs.)

Here is my exception:

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at javafx.scene.Scene$ClickCounter.access$7600(Scene.java:2985) at javafx.scene.Scene$ClickGenerator.preProcess(Scene.java:3081) at javafx.scene.Scene$ClickGenerator.access$8400(Scene.java:3051) at javafx.scene.Scene$MouseHandler.process(Scene.java:3302) at javafx.scene.Scene$MouseHandler.process(Scene.java:3164) at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119) at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228) at com.sun.glass.ui.View.handleMouseEvent(View.java:528) at com.sun.glass.ui.View.notifyMouse(View.java:922) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82) at java.lang.Thread.run(Thread.java:722) 

Thanks for any pointers on how to do this in general (and in this case in particular)!

UPDATE: I would like to know: should I debug my code to determine the reason for this? Or is this obviously a JavaFX bug? If so, I will report this to the responsible Oracle team.

+4
source share

Source: https://habr.com/ru/post/1436725/


All Articles