Android Question [B4X IDE] Commentlink file autoclose

Blueforcer

Well-Known Member
Licensed User
Longtime User
I've introduced a new command link in my project, structured as follows:

B4X:
'ide://run?File=%B4X%\UITest.jar

When I execute the program using this command link, it launches without any issues but unexpectedly shuts down after one minute, displaying "Completed. Exit code: -1." This occurs even with a fresh, unmodified template of a B4J UI program.

Interestingly, when I start the application without using the command link, it runs continuously without closing on its own.

How can I modify the command link to prevent the application from closing prematurely?
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Without a tracelog i guess noone can answer here.
You need to find out why it is exiting.
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
Without a tracelog i guess noone can answer here.
You need to find out why it is exiting.
There is no tracelog, it seems the IDE just closes it with Completed. Exit code: -1.. And it happens with every program after exact 1 minute.
Starting it with commandline or double-click, the application stays.

i also tried it with scrcpy
B4X:
'scrcpy: ide://run?file=%PROJECT%\scrcpy\scrcpy.exe
with the same behavior. starting the exe normaly it doesnt close itself

So im pretty sure the IDE has something like a timeout etc when calling the file.

ive attached the test-app wich deos nothing except of showing the standard B4J template Form. Copy it into the IDE install folder and hit the comment link
 

Attachments

  • UITest.jar
    413.1 KB · Views: 77
Last edited:
Upvote 0

teddybear

Well-Known Member
Licensed User
I've introduced a new command link in my project, structured as follows:

B4X:
'ide://run?File=%B4X%\UITest.jar

When I execute the program using this command link, it launches without any issues but unexpectedly shuts down after one minute, displaying "Completed. Exit code: -1." This occurs even with a fresh, unmodified template of a B4J UI program.

Interestingly, when I start the application without using the command link, it runs continuously without closing on its own.

How can I modify the command link to prevent the application from closing prematurely?
As DonManfred said, it will have a tracelog above "Completed. Exit code: -1.". I have tested the UITest.jar you posted on my IDE, it works.

 
Last edited:
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
As DonManfred said, it will have a tracelog above "Completed. Exit code: -1.". I have tested the UITest.jar you posted on my IDE, it works.

I would post it if it said something. It shows nothing in my IDE except of this.
Did your test survive more than 1 minute?
 
Upvote 0

teddybear

Well-Known Member
Licensed User
An alternative solution is to build the jar as standalone package.
 
Upvote 0
Top