-
Notifications
You must be signed in to change notification settings - Fork 201
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
Segfault (sometimes!) using array::set_module_and_type and Python 3 #75
Comments
It causes random segfaults on shutdown of the python 3 interpeter. It appears to be an issue with the statically allocated dict objects - see boostorg/python#75
Just as a FYI: I have just merged a new NumPy C++ API extension into the development branch, and plan to release that with Boost 1.63. (It still lacks integration with Boost's own build system, as I'm mostly just working with Boost.Python's SCons-based build logic nowadays.) |
Had to drop boost::python::numeric to wrap numpy ndarray; using bp:numeric causes segfaults on python3 exit: boostorg/python#75 boostorg/python#79 Work around the problem by defining a custom python object to handle the numpy array. These links were used as reference to reach this solution: mantidproject/mantid@7371d12 https://github.com/boostorg/python/blob/352792c90a36ee8d6a520c7602b2dbd03ab19c3f/include/boost/python/numpy/numpy_object_mgr_traits.hpp
The |
The following stripped down example demonstrates the issue.
Module definition:
Running the following produces a segfault but not for every run:
The backtrace from a debug with of Python:
I am not certain if it is related to this Python issue: http://bugs.python.org/issue17703
The text was updated successfully, but these errors were encountered: