question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extreme memory usage in GPUInterop

See original GitHub issue

Describe the bug I’ve been using the GPUInterop sample to build my own interop layer for my D3D11 graphics library and Avalonia. And I actually got it working! So… yay!

However, when it ran for a few seconds, the memory usage became insane. Just consuming a ton of RAM. So, to ensure that I didn’t do anything wrong I ran the GPUInterop sample (with DISCO turned on) and waited for like 5-10 seconds. That’s when I saw this: image As you can see, the memory usage is crazy.

In my own code, I was able to stop the memory leakage when I commented out this line of code: LastPresentation = _surface.UpdateWithKeyedMutexAsync(_imported, 1, 0);

To Reproduce Run the GPUInterop sample for several seconds and turn the DISCO slider up.

Expected behavior Stable memory usage.

Desktop (please complete the following information):

  • OS: Windows 11
  • GPU: Geforce 3090 RTX (Driver 527.56)
  • Avalonia Version: Latest from master (pulled prior to running the GPUInterop sample).

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
maxkatz6commented, Jun 8, 2023

@Tape-Worm possible fix should be in the master as for now https://github.com/AvaloniaUI/Avalonia/pull/11643

2reactions
Tape-Wormcommented, Jul 3, 2023

So, I pulled from the avalon-all nuget packages (the nightly masters haven’t been updated since June 5th), and everything looks great. I’m able to get my stuff rendering with no memory issues.

Have a look: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extreme Memory usage and freeze : r/Astroneer
Extreme Memory usage and freeze. Hello, I've been playing the game for a month now without any problems. I have a capable pc...
Read more >
Extreme memory usage
Tried it on fullscreen 1024x768 with high settings now and there it works fine. Still 6GB usage of ram but only ~30% GPU...
Read more >
High Memory Usage | Supabase Docs
High memory usage doesn't necessarily mean that your instance is at risk. Memory that is used for caching and buffers improves data access...
Read more >
How To Fix High Memory/RAM Usage In Windows 10 - YouTube
In this this brief tutorial, I show two methods on how to resolve high memory usage in Windows 10. Windows 10 update problems...
Read more >
Very high ram usage for no apparent reason even when idle.
Processes tab of Task manage shows only one type of memory use - processes' private working set, so it cannot be the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found