B4J Question Occasional crash when starting the debugger

Didier99

Member
Licensed User
I occasionally get this error when starting a program in debug mode. Simply restarting the debug session always works the second time.
It does not crash every time, it seems more likely to crash if I have not used the computer for a moment.
B4X:
Waiting for debugger to connect...
java.lang.ExceptionInInitializerError
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:495)
    at java.base/java.lang.Class.forName(Class.java:474)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.loadClass(LauncherImpl.java:383)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$3(LauncherImpl.java:422)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: java.lang.RuntimeException: java.net.SocketException: Connection reset
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:140)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
    at b4j.can232.main.<clinit>(main.java:17)
    ... 13 more
Caused by: java.net.SocketException: Connection reset
    at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:313)
    at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:340)
    at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:789)
    at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1025)
    at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:255)
    at java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:289)
    at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:276)
    at java.base/java.io.DataInputStream.readByte(DataInputStream.java:271)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
    ... 15 more
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1081)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getMethod(String, java.lang.Class[])" because "<local6>" is null
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:459)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ... 2 more

It is not a show stopper, I am just concerned that I am missing something and if not fixed, it could get to the point where it crashes every time and that would be bad.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…