B4J Question Project containing bugs: debug and release behavior.

LucaMs

Expert
Licensed User
Longtime User
Running a project containing bug(s), in debug mode it logs the error and crashes. If you run it in release mode (of course even if you run the jar) no crashes happens.
(I'm attaching a test project. Press on button "Error" and then on button "Toast").

Two questions:

  1. is this a design choice? (I believe that any sw for Windows - and other OSs - would crash if it contained a "serious" bug);
  2. is this due to the Resumables?
 

Attachments

  • BugTest.zip
    2.2 KB · Views: 129

agraham

Expert
Licensed User
Longtime User
It's more complicated than just "RunLater swallows the exception" as contrary to my expectations a try...catch round the code in a Resumable Sub DOES catch the exception and enable recovery from it. Could something be added to the compiled code to at least notify that a problem has happened?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
But shouldn't the behavior be the same even in debug mode, even though it depends on JavaFX?
The debugger does catch the error at some point. In release mode it doesn't add any additional try / catch blocks.

Could something be added to the compiled code to at least notify that a problem has happened?
It should might be possible. I need to check it, to make sure that it doesn't have other side effects.
 
Upvote 0
Top