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 Leak with the Phong Renderer from PySixd #3

Open
Arka161 opened this issue Mar 24, 2022 · 1 comment
Open

Memory Leak with the Phong Renderer from PySixd #3

Arka161 opened this issue Mar 24, 2022 · 1 comment

Comments

@Arka161
Copy link

Arka161 commented Mar 24, 2022

Hello there,

I have noticed that there's a major memory leak in the repository when we use the Phong renderer, and try to render multiple images (eg: On datasets such as T-LESS PBR, referenced in the BOP Challenge and Cosypose).

Steps to repro:

  • Just run a for loop over a few epochs and try to get the rgb and depth using the Phong renderer for a loaded Mesh + Image configuration.
  • The memory would gradually be increased till it crashes the RAM.

Let me know if you need any further details or code snippets related to the bug.

@Arka161
Copy link
Author

Arka161 commented Mar 25, 2022

Just to clarify, this error doesn't hit normally, as the error seems to be on the GL/C++ end of PySixd.

The reasons generate_batches directly won't cause the bug, is because Python clears the memory when the program exits. But if in the same code you call render_phong multiple times in a loop (it is useful when you try to load up a custom dataset), the memory leak is very stark.

Are there are reference repos where I can mention this to the PySixd Devs? I also realized that the fix isn't super trivial as calling a gc() wouldn't work as the leak is associated with C++ objects.

Thank you so much

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