MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Demo app huge memory leak

Open holmes000 opened this issue 1 year ago • 9 comments

Bug explanation

I had the demo app (.NET Core 3.1) running in background, after ~1 hour I noticed some lags, task manager reported that the demo app has used 58 GB of memory.

Version

4.9.0

holmes000 avatar Jan 24 '24 13:01 holmes000

Do you recall which page you had opened when this occurred?

And just confirming, this was the published version of the demo app for the 4.9.0 release from the releases page?

Keboo avatar Jan 24 '24 18:01 Keboo

Sorry, I didn't get a chance to check which page was open when this happened, my screen was blacking out and some weird things started happening, I terminated the process right away. I tried to take a screenshot of task manager, but the shortcut just didn't work until significant amount of memory was released. Looks like my SSD was doing a good job with the paging file before hitting 58 gigs.

I recall opening the demo app for taking a glance at group boxes and just forgot to close it afterwards. So probably it was on the group boxes page.

Yes, it was the published release version from my downloads folder "%userprofile%\Downloads\demo-app\Release\netcoreapp3.1\MaterialDesignDemo.exe".

I understand that you have literally no info to work with from here, I'll try to leave it open in a VM, see if the leaking happens again and attempt to gather some more info.

holmes000 avatar Jan 24 '24 23:01 holmes000

Awesome, thank you for the information.

Keboo avatar Jan 24 '24 23:01 Keboo

Unfortunately I can't reproduce this even after leaving the VM running overnight.

holmes000 avatar Jan 26 '24 07:01 holmes000

I just experienced the same issue with the app opened with debugger attached. 6gb of usage, on the button page.

jhimes144 avatar Feb 02 '24 01:02 jhimes144

I had the same issue.

RihardNovozhilov avatar Feb 04 '24 21:02 RihardNovozhilov

If possible, when someone is able to reproduce this could you try and grab a memory dump. Doesn't even need to be anything huge, if you see the demo app exceed 500MB that is already unexpected.

https://learn.microsoft.com/dotnet/core/diagnostics/debug-memory-leak?WT.mc_id=DT-MVP-5003472#generate-memory-dump

Keboo avatar Feb 08 '24 04:02 Keboo

Hello @Keboo

I also have issues from time to time, when having the Demo running in the background for quite a while, it freezes and needed to be killed by the task manager. This is also more related to the 4.5 / 4.6 version with .NET Core 3.1.

I just downloaded the latest (5.0) version, visited every page and go to the buttons page (as this is the one I kept usually open I think when this issue occured). I clicked a bit around there (button clicks, XAML preview clicks) and got it over 500MB memory usage.

While I then uploaded the first dump, I noticed, that it meanwhile got up to 750MB, so I created another dump. Both can be found by following the link (as each file is too big to upload it here):

https://1drv.ms/f/s!AvTQ0Wkj4g-crdhy6ETUxnnP65dOCw?e=EXhPLr

Hope it helps.

PS: Let me know, when I can delete these files from my OneDrive ;-)

trdsolutions avatar Mar 16 '24 20:03 trdsolutions

@trdsolutions thank you for the dumps. I have downloaded them. You can remove.

Keboo avatar Mar 21 '24 06:03 Keboo