B4J Question [Solved] UI App closes without error - why?

Mark Read

Well-Known Member
Licensed User
Longtime User
I am developing an UI app which will be used in a windows environment. The layout is very simple:

Button - Exit
Button - Select
Tableview - For data

On clicking Select, the file chooser is called and a program file is selected. The name is passed to a sub which reads the file, line by line and searches for "objects and properties" (nothing to do with B4X). Once all objects are found a second sub is called which slices this string info using Regex and puts the data into the tableview.

Everything works, without errors. So what is the problem? As soon as the data is put into the tableview the App ends!

What have I missed? The App should stay open and at least wait for me to click Exit. I am sure it is something simple. Note: I am only running in debug mode.

Many thanks.
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Absolutely nothing. All the log(x) values I am using to debug are correct. I see the tableview being filled and then bang. App closed.

If it wasn't so annoying I would laugh. :D
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
have you tried the unfiltered logs to try to glimpse an error message?
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Will have to post that tomorrow. I am developing on my work's PC.

B4J 4.20 and Windows XP SP3 (NO laughing, XP is still great for 25 year old control software!), Java I will need to check but it is the latest update for XP.

have you tried the unfiltered logs to try to glimpse an error message?
NO, didn't think on that. Will try in the morning.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Okay, took a fresh look at the code this morning.

I was pre-allocating a 2D array to hold the objects. CHanged this to a list and now it works fine. No idea why!!

Thanks for the pointers.
 
Upvote 0
Top