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

Memory deallocation bug in Drawables #59

Closed
PSteinhaus opened this issue Dec 12, 2021 · 2 comments
Closed

Memory deallocation bug in Drawables #59

PSteinhaus opened this issue Dec 12, 2021 · 2 comments

Comments

@PSteinhaus
Copy link
Member

When running the drawing example I see a problem with memory comsumption; the process crashes after a few minutes. Same behavior under Ubuntu or Centos. This seems the buggy memory allocation:

amsoares@ubuntu:drawing$ pmap -x 4964 | grep renderD128 | wc -l # <-- Value increases until it crashes
64488
amsoares@ubuntu:drawing$ pmap -x 4964 | grep renderD128 | wc -l # <-- Already crashing
48439
amsoares@ubuntu:drawing$ pmap -x 4964 | grep renderD128 | wc -l # <-- Process dead
0
amsoares@ubuntu:drawing$

I'm not a developer, I'm just learning Rust and ggez/gwg.

Originally posted by @ccie18473 in #57 (comment)

@PSteinhaus
Copy link
Member Author

PSteinhaus commented Dec 12, 2021

This is really bad.

I haven't yet had the time to look much into it, but for some reason memory leaks have started to come up in all of our examples where Meshes are created inside the draw loop and then dropped, meaning there is probably still something wrong with them not deallocating their ressources correctly.
I haven't tested yet whether Image, SpriteBatchor MeshBatch are impacted as well.

I assume it's the textures not being released correctly, due to the hacky system we currently have in place for that, but I could be wrong.

I'll try to look into it as soon as I can.

@PSteinhaus PSteinhaus pinned this issue Dec 12, 2021
@PSteinhaus
Copy link
Member Author

Fixed in cf3a50b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant