B4J Question How do you capture error logs in release mode?

TorontoJim

Member
Licensed User
Longtime User
I've surfed for half the better part of an hour on the forum and found lots of answers for B4I and B4A.

I'm using B4J. I don't have a "legacy debug" mode, I only have one debug mode.

The app works fine in debug and release, when called through the IDE. However, running the released jar, it crashes when I try to do anything after it launches. I'm bound and determined to figure this out, have been writing my own log files through each step of the process, but don't see where it is failing.

Is there a way to see error log/error messages from the release mode jar when it is running?

Just point me to the RIGHT documentation. I don't have another computer to run something separate on (as I read in one thread), I left my laptop at work. Is there anything I can do here on one machine?
 

TorontoJim

Member
Licensed User
Longtime User
I think this means that an object stored in the KVS file is too big (an image, probably) ... but that's just a guess. Am I at least on the right track? But if so, why would it crash the jar but not the exe?

I have no background in java so I have no idea what Java heap space is, or why it would cause the app to be out of memory. Sorry. Noob here.

B4X:
keyvaluestore._getobjectinternal (java line: 202)
java.lang.OutOfMemoryError: Java heap space
	at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readHelper(RandomAccessFile.java:382)
	at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadObject(RandomAccessFile.java:369)
	at b4j.example.keyvaluestore._getobjectinternal(keyvaluestore.java:202)
	at b4j.example.keyvaluestore._getobject(keyvaluestore.java:168)
	at b4j.example.main._loadkvsdata(main.java:599)
	at b4j.example.main._combofilefield_selectedindexchanged(main.java:380)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
	at anywheresoftware.b4a.BA$2.run(BA.java:165)
	at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$50/7912477.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$49/9599617.run(Unknown Source)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
	at com.sun.glass.ui.win.WinApplication$$Lambda$38/20085625.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…