B4J Question [problem gone] Occasional Debug crashes

Didier9

Well-Known Member
Licensed User
Longtime User
This is a bit hard to describe.
I am working on this program (the same for several years, just adding new features and fixing bugs) and it seems that recently I started getting crashes when I recompile in debug mode:
B4X:
Waiting for debugger to connect...
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.NullPointerException
	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383)
	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
	... 5 more
java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$155(LauncherImpl.java:352)
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
	at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
	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$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)
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.r9_b4j.main.<clinit>(main.java:17)
	... 11 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:210)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
	at java.io.DataInputStream.readByte(DataInputStream.java:265)
	at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
	at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
	... 13 more
It does not do it every time but once it does it, I have to restart the IDE (or switch to release mode) then I am good again for a little while.
If I switch to release mode after it has crashed in debug mode, then it runs, but if I go back to debug without restarting, it will fail again.
It does it when I do an incremental live update and when I do a complete recompile.
I am using B4J v9.80.
It does it on multiple computers with the same project, 32 or 64 bits Windows 10 Pro with Oracle Java and 8 or 16 GB of RAM.
I am reluctant to post the entire project because it is very large, and it seems to be the only project that does it, so I do not have a small project that does it.
Some guidance as to what to do next to debug this will be appreciated.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
even if you only modify files always use the
git add .
(this is not adding files, this is adding the changes to git)
then the process as you just said.
 
Upvote 0
Top