You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a segmentation fault when importing matplotlib.pyplot after importing mitsuba. The issue occurs at the line where matplotlib.pyplot is imported.
Steps to Reproduce:
Install mitsuba and matplotlib in the same Python environment.
I suspect this has something to do with the libstdc++ / libc++ incompatibility in exception handling.
Did you build Mitsuba yourself using Clang? If so, when importing Mitsuba first, the libc++ exception handlers are used. But Matplotlib throws libstdc++ format exceptions, which causes a segfault when handled.
The workaround I can think of:
Build Mitsuba with GCC (which uses libstdc++)
Downgrade Matplotlib to an earlier version which doesn't throw such an exception
Remove the source of the exception (only possible if the exception is not meant to be thrown; it might actually be part of the normal functioning of Matplotlib).
Description:
I encountered a segmentation fault when importing
matplotlib.pyplot
after importingmitsuba
. The issue occurs at the line wherematplotlib.pyplot
is imported.Steps to Reproduce:
mitsuba
andmatplotlib
in the same Python environment.Expected Behavior:
The script should run without any segmentation faults, and all print statements (
OK1
,OK2
,OK3
) should be displayed.Actual Behavior:
A segmentation fault occurs at the line where
matplotlib.pyplot
is imported.Environment:
mitsuba
version: [3.6.2]matplotlib
version: [3.10.0]Solution:
Reordering the imports resolved the issue. Specifically, importing
matplotlib.pyplot
beforemitsuba
prevents the segmentation fault:The text was updated successfully, but these errors were encountered: