Bug? B4J Crashes when switching from the IDE to the designer panel

rgarnett1955

Active Member
Licensed User
Longtime User
Hi,

Every now and then, probably about 5% of the time B4J crashes when I switch from the IDE to the designer panel and then try to click on a view. The screen of a crash is shown below
B4JCrash.png



I have seen the same thing in B4A.

I have a feeling it might happen if the IDE is doing an auto-save, but I really don't know for sure.

You have to kill the process then restart.

I haven't been able to see any pattern behind this behaviour so I can't reproduce it at will.

Has anyone else experienced this?

Does anyone know how to prevent this?

Best regards
Rob
 

rgarnett1955

Active Member
Licensed User
Longtime User
Might be a memory or display driver issue.

Enabling the logs might provide more information: https://www.b4x.com/android/forum/posts/50478/

Also try to update .Net Framework.

Hi Erel,

Already up to date with .NET at 4.8 Runtime and developer.

I have enabled the log.

I'm not sure what the memory issue might be . I have 64 GByte RAM and 30 GByte of Swap. Are you referring to this or are you referring to the java memory setting? Should I increase my Java Heap settings in the Java Control Panel?

I have NVidia GEFORCE GTX 980 Ti cards with the latest driver 457.3 I haven't had any problems with this setup with the exception of Mail Washer Pro that does crash occasionally although I can't say this is the video.

Best regards
Rob
 

rgarnett1955

Active Member
Licensed User
Longtime User
Hi Erel,

Please find attached a log of a crash of five minutes ago.

Best regards
Rob
 

Attachments

  • b4JCrashLogRJG_001.zip
    51.1 KB · Views: 146

Erel

B4X founder
Staff member
Licensed User
Longtime User
The relevant error is:

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
at System.Windows.Media.MediaContext.CompleteRender()
at System.Windows.Interop.HwndTarget.OnResize()

As it happens often on your computer, and it never happens to most users (I can keep the IDE running for weeks here), I guess that there is some compatibility issue with the display driver and .Net Framework.
 

rgarnett1955

Active Member
Licensed User
Longtime User
Hi Erel,

I would make the following points about your answer:

- NVidia drivers ubiquitous, I'm not Robinson Crusoe here.
- .Net Framework working with NVidia cards/drivers are also ubiquitous
- None of my other software has any memory problems or crashes (apart from Microsoft Office Products which are as buggy as hell and then only with very, very big files)
- None of the software I write with B4X have problems with memory and most of them use large arrays.
- A lot of my B4J apps run 24/7 and use the same graphics card.
- It started happening about the time Covid-19 really kicked-in, around April. It hasn't always done it.
- It only happens in the Designer - never in the IDE.
- None of my other graphics programs crash; Corel Draw, paint.net, the Qt Designer, MS Access form designer, Simulink, Visio etc. This suggest that the Designer is doing something different from all of these.

I can live with it as long as it doesn't get worse, but if you have any ideas on how I might get to the bottom of it I would appreciate that.

I deiinstalled and then reinstalled B4J, but that hasn't fixed it. One possibility is that I am using a two Hi Res 3840 x 2160 displays. That would tend to increase memory usage. Maybe that is the problem. I have noticed that some of my programs are slower with these screens, Start 10 Fences for example, but they don't crash.

What graphics card and memory are you running on your system?
Are there any tests I could run?

Best regards
Rob
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
None of the software I write with B4X have problems with memory and most of them use large arrays.
- A lot of my B4J apps run 24/7 and use the same graphics card.
The IDE is a .Net WPF app. This is not the same as your B4J apps.

One possibility is that I am using a two Hi Res 3840 x 2160 displays. That would tend to increase memory usage. Maybe that is the problem.
Might be related to the scaling. Is there an option to run B4J in "compatibility mode"?

Are there any tests I could run?
Low chances to help but it is worth a try: https://www.b4x.com/android/forum/threads/b4a-6-3-freezed-on-designer.71579/post-455326
 
Top