Seg fault running basic.py on MacOS


#1

I’ve checked out the repo and built it sucessfully – appleseed.cli and appleseed.studio run without issue from the sandbox/bin/Ship directory.

But, after setting my PYTHON_PATH and LD_LIBRARY_PATH to locate the python bindings, basic.py crashes when importing appleseed. This is top of the call stack:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.python.python               0x000000010c164e6f PyInt_FromLong + 33
1   _appleseedpython.so             0x000000010abfed19 boost::python::api::proxy<boost::python::api::attribute_policies> const& boost::python::api::proxy<boost::python::api::attribute_policies>::operator=<int>(int const&) const + 25
2   _appleseedpython.so             0x000000010abfe6d9 bind_appleseed_python_classes + 249
3   libboost_python-mt.dylib        0x000000010c0e8df8 boost::python::handle_exception_impl(boost::function0<void>) + 72
4   libboost_python-mt.dylib        0x000000010c0e9e7b bool boost::python::handle_exception<void (*)()>(void (*)()) + 59
5   libboost_python-mt.dylib        0x000000010c0e9d54 boost::python::detail::init_module(char const*, void (*)()) + 84
6   org.python.python               0x000000010a79ff1e _PyImport_LoadDynamicModule + 150
7   org.python.python               0x000000010a79ecbb import_submodule + 273
8   org.python.python               0x000000010a79e892 load_next + 272
9   org.python.python               0x000000010a79d8b1 PyImport_ImportModuleLevel + 575
10  org.python.python               0x000000010a7840cf builtin___import__ + 124

Any ideas what’s going on? Thanks in advance!


#2

Hi, I’m going to have a look!


#3

So basic.py continues to work as expected on Windows.

Could you try with a debug build of appleseed?