Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metal] Memory leak in imgui-wgpu-rs #1537

Closed
sanbox-irl opened this issue Jun 21, 2021 · 3 comments
Closed

[Metal] Memory leak in imgui-wgpu-rs #1537

sanbox-irl opened this issue Jun 21, 2021 · 3 comments
Labels
help required We need community help to make this happen. type: bug Something isn't working

Comments

@sanbox-irl
Copy link

Description
There appears to be something like a memory leak in https://github.com/Yatekii/imgui-wgpu-rs's example custom_textures. You can run it with:

cargo run --examples custom_textures

That repo is on version 0.8.1 but on a local, I updated it to 0.9.0 (it updates without issue) and the issue persists.

Specifically, we start out at about 80mgs of memory, which seems about right, and then skyrocket somewhere near a gig. Sometimes much more than that, other times less than that. I'm not sure what's causing it.

I have chosen the file the issue here because looking through imgui-wgpu-rs, there doesn't seem to be anything obviously leaky that's occurring, so I suspect the problem is in WGPU or lower.

Platform
M1 Mac mini, Big Sur. I don't believe this has anything to do with the arm nature of this Mac, but I am available to run tests if asked at any time 9-5 EST.

@kvark
Copy link
Member

kvark commented Jun 22, 2021

Interesting! I wouldn't expect the memory usage to skyrocket like this. At least gfx-backend-metal is not leaking, or otherwise Dota2 wouldn't run. So if there is a leak, it's something about wgpu-core, or how it uses gfx.

@kvark kvark added help required We need community help to make this happen. type: bug Something isn't working labels Jun 22, 2021
@sanbox-irl
Copy link
Author

okay not to be a crazy person here, but to absolutely be crazy, it seems to have something to do with the window being in the background not correctly clearing the submitted data within the queue?

I can currently reproduce by running imgui-wgpu-rs...

cargo run --examples hello_world

and then navigate within the Demo window that comes up to the Widgets and then Plot Widgets tab (which generates a lot of geometry).

I'm not sure why in my own application though, this happens MUCH faster. Still will investigate though

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Jun 6, 2022

Making as superceded by #1783

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2022
Patryk27 pushed a commit to Patryk27/wgpu that referenced this issue Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants