mitsuba-renderer / nanogui

Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL
Other
1.56k stars 196 forks source link

Garbage collection issues #143

Open ainaerco opened 1 year ago

ainaerco commented 1 year ago

Hello, I compiled nanogui from scratch using python3.8, gcc 9.4 on Ubuntu 20.04. Sadly I'm getting errors when trying to launch python examples: example1.py, example3.py... Binary examples and example2.py as well as rendertest*.py work fine. I'm getting such errors for example1.py:

Exception ignored in: 'garbage collection'
Traceback (most recent call last):
  File "~/nanogui/build/platform-linux/python-3.8/nanogui-prefix/src/nanogui/src/python/example1.py", line 88, in __init__
    popup_btn = PopupButton(popup, "Recursive popup", icons.FA_DNA)
SystemError: Objects/typeobject.c:3034: bad argument to internal function
Fatal Python error: unexpected exception during garbage collection
Python runtime state: initialized

I tried to use latest nanobind 1.0.0 too. After some pondering it looks like related to registering python callback functions for the widgets. If I remove callbacks it works. Any idea what could be wrong?

Thanks.