Bug? B4X/B4i IDE occasionally becomes totally unresponsive!

Andris

Active Member
Licensed User
Longtime User
About a year ago I started a thread with a similar name: https://www.b4x.com/android/forum/threads/b4a-ide-occasionally-becomes-totally-unresponsive.129034/. My problem with either IDE occasionally freezing hasn't gone away regardless of many IDE updates since then, as well as many Windows 10 updates and driver updates on my laptop. Since mean time between freezing is on the order of days, I just live with the problem (the only one I've ever really had with either IDE!) by restarting the IDE when needed. Since no other app on my laptop PC gives me any problems at all in this regard, I've concluded that it's something having to do with B4A/B4i and how they interact with the Windows OS. I still wonder if any other users ever experience this problem. I don't see any discussion about one, so maybe it's just my situation. But since this also happened on my previous laptop, I kind of doubt it.

Here's a summary of what happens. I open B4A or B4i and usually constrain it to the left half of my screen so that I can open B4A/B4i Designer on the right side. Editing/compiling/downloading to my Android/iPhone works perfectly. I have AutoSave/AutoBackup both enabled (btw these settings don't seem to affect the problem). Then suddenly, the IDE becomes unresponsive. "Suddenly" is usually after something like a window size operation (half screen to full screen). Sometimes a Windows box pops up saying B4A/B4i is unresponsive and asking if I want to close, but not always. I go to the taskbar to close B4A/B4i and its Designer there. Eventually the IDE disappears from the screen.

After restarting B4A from a freeze, I've noticed that I have BA-Bridge problems. After reconnecting, the connection will be intermittent, as if it's competing with another copy of the IDE. I used to restart my laptop to fix this, but after investigating why, I've found that after a freeze, a copy of B4A still exists as a background task:


So instead of restarting after a freeze, I go to the B4A entry as above, select B4A, and end the task. B4A-Bridge then maintains its connection without problem. (Note that B4i and B4i Developer were also active in the screenshot - I frequently have B4A and B4i open at the same time - but this isn't the cause of the problem).

Like I say, I've learned to live with this, but in the service of helping make the fantastic B4X products as good as they can be, I thought I'd report the state of this "bug." If anyone else has experienced something similar, please add your comments.
 

Sandman

Expert
Licensed User
Longtime User
It sounds to me that you might arrive at the wrong conclusion. Remember, there are many users out there, and judging by the lack of reports I'd say the problem is on your side.

You say you have this on more than one computer, which leads me to suspect you have something installed on all of them, and this could be the cause. (I'll assume you haven't downloaded an ISO with Windows from some niche site on the net.)

So one way of testing my hypothesis would be to do a complete wipe and fresh install of Windows on one computer and ONLY install B4X and give that a try for a while. (I do realize it's painful to do this. If I were in your shoes I would probably swap the OS drive to a brand new one so all my files and apps on the real installation were available after the test.)
 
Last edited:

Andris

Active Member
Licensed User
Longtime User
Yes, I agree that my conclusion could be wrong . My inner self feels like it borders on the sacrilegious to even suggest B4A/B4i could be at fault, since I'm always proven wrong in the end lol. Right now I'm not motivated to test your hypothesis since the problem isn't irritating to a high enough level, but it does get me thinking again about other sources for the problem -- like antivirus for example. But it could also be that others also have had this problem, and like for me, it's only a minor irritation not worth spending energy on. I'll wait first to see if any others respond. Thanks for your input!
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
I am thinking it could be the Automatic Backup. Sometimes when the automatic backup is running, it freezes the IDE.

Disable the Auto backup and monitor it for a couple of days or weeks

Goto Tools -> IDE Options -> Uncheck Automatic Backup
 

tchart

Well-Known Member
Licensed User
Longtime User
I am thinking it could be the Automatic Backup. Sometimes when the automatic backup is running, it freezes the IDE.

Disable the Auto backup and monitor it for a couple of days or weeks

Goto Tools -> IDE Options -> Uncheck Automatic Backup
Yes totally agree. It’s the automatic backups. Make sure you don’t have any large files in the project that don’t need to be there. It freezes up as the project is being zipped. If you have many large files it can take a few seconds. I accidentally left an AVI file in one of my project folders and it would take minutes for the IDE to come back to life.
 

Sandman

Expert
Licensed User
Longtime User
When I start Sublime Text, it times the launch of all plugins installed. Once or twice it has popped up a message like "Plugin blahblah took a long time to start (0.1sec). Some text I don't remember. Yada yada."

Perhaps the backup function could time itself and if it takes too long (time specified in the .ini), it could pop up a message like "Autobackup took X seconds. During this time the IDE was unresponsive. The slow backup might be due to large asset files. Some more text about potential next steps."
 

Andris

Active Member
Licensed User
Longtime User
I am thinking it could be the Automatic Backup. Sometimes when the automatic backup is running, it freezes the IDE.

Disable the Auto backup and monitor it for a couple of days or weeks

Goto Tools -> IDE Options -> Uncheck Automatic Backup
Coincidentally, it just happened again in B4i. It happened right when I changed the window size from half screen to full. That was the same action as before the previous freeze a couple days ago, though that one was with B4A.

My project doesn't really have large assets. But I'll try disabling AutoBackup in both B4i and B4A and report back with results.
 

Cableguy

Expert
Licensed User
Longtime User
I have had similar issues, when the IDE would freeze and I found it was due to 2 mains reasons...
Low memory and AutoBackUp enabled.
It just wrecked my nerves.

Now I am experiencing a few connection interrupts between the IDE and Bridge ( I only use B4A).
But, I do also get my S20 wireles simbol WITH an exclamation point, leading me to think of a router issue.
 

Andris

Active Member
Licensed User
Longtime User
When you have your connection interrupts, have you checked Task Manager to make sure a second copy of B4A isn't running in background?
 

Andris

Active Member
Licensed User
Longtime User
UPDATE

I've now had B4A AutoBackup disabled for a couple of days. Just experienced a freeze when I expanded the B4A IDE from half screen to full. B4A Designer was also running in that half screen. B4A totally unresponsive so closed the windows via task bar. This time, Task Manager showed no running B4A background process.

Seems it's NOT related to AutoBackup.
 

Dave O

Well-Known Member
Licensed User
Longtime User
Lately I've also seen B4A freeze after trying to move its window to another monitor, or when trying to drag a tab to become a split window. I have to restart B4A.

I've already turned off Auto Save and Auto Backup, no difference.
 

rspitzer

Active Member
I get freeze ups rather consistently, only if I have been in B4J ide (coding and bridging), the I open the designer - crash. I just shut down everything, then open the designer when I have first opened the ide. Just live with it. Haven't complained, no program is perfect. Just learn the workarounds.
 

Andris

Active Member
Licensed User
Longtime User
Yes, I agree, no program is perfect. For what B4X products do, this is a minor irritation. But if it were gone for me, they would be close to perfect. I just experienced another freeze. Seems that whenever they do happen, it's a window resizing operation that precedes it, quite predictably.
 

Cableguy

Expert
Licensed User
Longtime User
Can it be a graphics issue? Are you (we) using onboard GC, which share the RAM? Any one if us using a dedicated Graphics Card, with it's own memory?
 

agraham

Expert
Licensed User
Longtime User
I wonder if this is a WPF issue (the IDE is built on WPF) that is outside of the IDE itself. It does seem to occur elsewhere
 

Jmu5667

Well-Known Member
Licensed User
Longtime User
Have you installed any other software recently prior to this happening ?
 

mmieher

Active Member
Licensed User
Longtime User
Can it be a graphics issue? Are you (we) using onboard GC, which share the RAM? Any one if us using a dedicated Graphics Card, with it's own memory?
I only started getting this after 11.50. I am now trying the Uncheck Auto Backup thing.

However, I think you are onto something with the graphics. I am having all kinds of Android/B4X issues with the GPU. Mainly in the emulators, but I think I have that stabilized now.

More later if it develops.
 

Andris

Active Member
Licensed User
Longtime User
From the Stackoverflow post, it sure does sound very much the same. I can state pretty conclusively that the freeze always happens during a window resize, and that it seems that the resize happens ... but then freezes before it's totally done. Good find!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…