UPBv2: Software crashes due to memeory leak

Ultimate Powerbox v1 and v2
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Hello Evans,

I have observed now 2 times, that the software crashes over night silently.
When returning to the PC the next day the application was closed and no logs were written. This happens since last update to 1.4.3.0.

Following entry can be found in Windows application log. It looks like a memory leak:

Application: UPB.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception)
at System.Windows.Forms.Control.WndProcException(System.Exception)
at System.Windows.Forms.Control+ControlNativeWindow.OnThreadException(System.Exception)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)


CS
Rüdiger
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Thanks for the update.
We do not have similar reports but I'll check as soon as possible if the application leaks memory.
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Addendum: I can see in task manager continuously growing memory allocation.
Since it is 32Bit (at least shown) the 4GB limit is reached during that observed time period. Probably that's the reason for the crash.
While typing this message it allocated 30MB more.

Update: Memory usage grows unlimited.
2021-02-22_00h23_00.png
2021-02-22_00h23_00.png (3.22 KiB) Viewed 12255 times
Thank you!
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

I tried yesterday evening and let it run for the whole night. Consumption was 220Mb when I closed the software (after 9h).

I'll recheck again if any special function causes that.
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Hi Evans,

I have repeated the test. It is running out of memory every time. Hitting the 4GB margin and then crashing.
2021-02-22_22h40_50.png
2021-02-22_22h40_50.png (3.9 KiB) Viewed 12246 times
Cheers
Rüdiger
Last edited by Ruediger on Mon Feb 22, 2021 9:42 pm, edited 2 times in total.
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Hi Ruediger,
It seems that this leak comes from the USB devices listing table.
I'll try to redesign this god damn thing to display better information for all plugged USB devices
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Thanks a lot!
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Just received another error pop-up at 1.7GB memory consumption.
When you confirm it with "OK" it keeps opening up again and again. And then UPB crashed with an .net exception but unfortunately when clicking on details the message disappears. It was closed with the application. But Eventlog shows the same error as before. See third screenshot.

2021-02-23_13h39_28.png
2021-02-23_13h39_28.png (3.17 KiB) Viewed 12242 times
2021-02-23_13h39_42.png
2021-02-23_13h39_42.png (1.26 KiB) Viewed 12242 times
2021-02-23_13h39_42.png
2021-02-23_13h39_42.png (1.26 KiB) Viewed 12242 times
Attachments
2021-02-23_13h46_31.png
2021-02-23_13h46_31.png (24.11 KiB) Viewed 12240 times
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

One more error:
2021-02-27_13h59_28.png
2021-02-27_13h59_28.png (1.61 KiB) Viewed 12222 times
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

The latest version is absolutely unstable. It crashes frequently. A serious usage is not possible.

Yet another:
2021-02-27_23h48_14.png
2021-02-27_23h48_14.png (21.87 KiB) Viewed 12218 times
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Hi Ruediger,
I really cannot explain all these errors in the software. I do not have similar reported issue for the current software.
Still the memory leak is very low compared to what you sent. (screenshots do not lie - maybe something is different in your Windows framework).
I'll do extensive tests about the memory consumption and all of these alerts and we'll be in touch via this thread.
Please expect my findings in 3-4 days from now.
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Hi Evans,

many thanks for the update. My system is a normal W10 with all updates. Build 20H2 19042.804
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

The latest software version v1.4.4 handles some of these issues (especially the error messages).
Also takes care the memory leak with a workarround. It requires a feature rewrite for better usb devices discovery
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Hi Evans,

I have installed 1.4.4 this afternoon and it is running since. The memory leak is not fixed. The process is growing unlimited.
2021-03-06_20h18_06.png
2021-03-06_20h18_06.png (3.17 KiB) Viewed 12030 times
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Is the powerbox connected when you observe this memory leak?
Try to just open the software without connecting it to UPB and let me know
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Its fully connected. 4x power, 5xUSB.
It just crashed right in that moment by running out of memory....

And memory got freed:
2021-03-06_22h21_47.png
2021-03-06_22h21_47.png (3.08 KiB) Viewed 12026 times
2021-03-06_22h20_35.png
2021-03-06_22h20_35.png (51.9 KiB) Viewed 12026 times
Last edited by Ruediger on Sat Mar 06, 2021 9:36 pm, edited 1 time in total.
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Unfortunatelly I cannot replicate this huge mem leak on my test PC.
Try to uninstall and install this test release -> https://pegasusastro.com/wp-content/upl ... -test1.exe
Let me know if things look better
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Ok. I have installed it. It seems to have the same effect. It grows approx 2 MB per Minute.

Update: It frees memory!!! juhu! It is not growing beyond 20 MB memory footprint.
User avatar
Evans
Site Admin
Posts: 504
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: UPBv2: Software crashes due to memeory leak

Post by Evans »

Alright, great! please monitor it for tonight and let me know tomorrow.
(I'll have to rewrite the usb device isting code from scratch)
User avatar
Ruediger
Posts: 28
Joined: Fri Dec 04, 2020 7:59 pm

Re: UPBv2: Software crashes due to memeory leak

Post by Ruediger »

Currently it is stable - not more than 21 MB.
Post Reply