Serious problems with crashes when using B4A with one of my big proejects

Penko

Active Member
Licensed User
Longtime User
Hello Erel, hello all!

It has been 1 hour now since my nightmare started. I am warning that this topic may become a little long but I will try to chronically represent everything that happened and what steps I've taken.

1) I haven't used B4A for 2 days but it stays open as I turn off my laptop by just opening and closing it. So B4A stays switched ON but I haven't done anything with it(maybe I was browsing my source code 2-3 times).

2) Today, I've decided to complete another step form my project which was a crucial one I was just thinking on it these 2 days.

I switched to Basic4Android(I already expained it's always ON). I did some other work and went to check an existing Activity of mine which is 90% identical to the one I had to create. For my great surprise, B4A crashed.

I heard the Windows error sound but no error message appeared or at least it doesn't have any text. B4A didn't crash with "Dont send", its design layout just looked worse.

I went to make a screenshot with "Alt + PrintScreen"(capture the most top window) and for my great surprize, it captuted a while box(see the screenshots). This makes me believe there is some message box trying to pop up but nothing is displayed.. I tried without the "Alt" key but I wasn't able to take a screenshot. That's why I took a picture with my phone(see the attached files). I've censored my sensible names, it's not a bug in the B4A environment.

I tried opening another projects of mine(smaller) and they open pretty good.

This problematic project has abou 25 Activities and maybe 40 other files -> Code Modules, Classes and one Service.

I was worried if all my activity code would be there because I don't see how it is stored in the project folder. That's why I compiled but everything was successful and the APK runs pretty good on my phone.

The problem appears these ways:
1) If I open B4A and just go and start scrolling up/down in the list of Activities, Code Modules, etc... In a seconds or two B4A outputs the "Out of Memory" error box. Please note that this error is different from the "non-message box" error.
2) The non-messagebox error appears if I open B4A and click any of the items(from the list pane on the right side). The interesting part is that I was able to click three different items from the horizontal tabs before the error appears. So maybe it has to do with memory too?

When this error happens, I have no more option to click on my items. Clicking on them does nothing. I can't even close the IDE, I have to kill it with task manager.

I got really shocked. I said "this computer worked, maybe its settings have screwed".

I made "System Restore" to a date 5 days ago. It didn't help.

I reinstalled B4A 2.02(I didn't remove it, just ran the installed again). At the middle of the processes, an error regarding the "Dexer.jar" appeared(see the screenshots again). I tried "Retry" but this error was popping up every time I "retry". The installation was able to continue when I killed the virtual machine processes "java.exe" or the "javaw.exe". I am sorry, I don't exactly remember which of these I killed. So the java process has occupied the "Dexer" even though I've closed the B4A(killed with task manager, maybe that's the reason).

I reinstalled successfully, started the IDE and the problem was still present.

Please note that I am still able to compile successfully and all my activities work pretty good on my phone.

Maybe it's worth mentioning, B4A is using about 60 MB of RAM.

I've provided an image of my configuration paths. I am using JDK 1.6, can this be a problem causing the IDE to behave so unexpectedly? I've heard it produces compile problems but why IDE problems?

I will pack the screenshots in a ZIP file because I am currently using my smartphone's mobile network via WIFI and can't spend the time to upload one by one. My connection is very poor(GPRS) and will have a good one tonight. But I can't wait to report it then.

I am currently really blocked. I can't progress further with my project. Erel, my deepest ask is that you check this out and let me know if I have to take further steps which will help you identify the issue.

Edit: My connection can't make it to upload the screenshots, I will need to upload them later.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
As you wrote you are getting an out of memory error. It is not related to the Java version. I also don't think that reinstalling Basic4android will change anything.

You can right click on some of the modules and press Hide module. Then when you load your project these modules will not stay hidden and will consume less memory.
 

mc73

Well-Known Member
Licensed User
Longtime User
I don't know, I'm sure Erel would help you on this, but apart from b4a, are you perhaps using any other language at the same time? Note that sometimes, arrays and grids can eat too much memory, leading to crashes. Again, I'm not referring to the b4a IDE here.
 

Penko

Active Member
Licensed User
Longtime User
Thank you both!

Erel, maybe it has to do with open modules. I don't have a habit to hide them which means I can't say the exact number of open modules. Unfortunately, when trying to hide a single module, the IDE hangs with the second type of error(the sound of error but no error message). As I said above, out of memory is only when scrolling up and down. In all other cases it is the nameless error. So, I am stuck because hiding a single module produces the error. The IDE hangs and I can't save. Without saving, after I kill the process and start it again, the module is open again.

Any way to hide them all? I am not to ask you for a hotfix providing this option, I just have to exit this situation safely somehow. My laptop is pretty powerful and maybe this memory limit's value can be modified. But the big question, what is the nameless error.

How do I continue from here?

Sent from my HTC Desire using Tapatalk
 

Penko

Active Member
Licensed User
Longtime User
As for the out of memory error. I can't explain to myself, why scrolling a ListView(the module names container) affects this as I don't click on the module to open it, I just start scrolling upwards and downlards, without clicking. Maybe these two problems are related to a single error.

Sent from my HTC Desire using Tapatalk
 

Penko

Active Member
Licensed User
Longtime User
I made it by starting the hide process from modules with less B4A code. One at a time, save, the IDE hangs at the second. I restarted about 10 times this way and obviously was now having enough memory to hide the others without killing the IDE. This confirms it has to do with memory.

Sent from my HTC Desire using Tapatalk
 
Top