pace-neutrons / pace-python

Python module of the PACE inelastic neutron data analysis suite of programs.
GNU General Public License v3.0
3 stars 4 forks source link

Segfault on exit on Linux #3

Open mducle opened 3 years ago

mducle commented 3 years ago

For complex operations, pace_python almost always segfaults on exit on Linux.

Run the following script:

import pace_python
m = pace_python.Matlab()
sw = m.spinw()
print(sw)

This produces a segfault. If the final line print(sw) is removed, there is no segfault... there's something screwy with the garbage collector...

The following base matlab-python code also segfaults:

import pace_python.pace
m = pace_python.pace.initialize()
sw = m.call('spinw', [], nargout=1)
m.call('disp', [sw], nargout=1)
m.exit()

(the segfault occurs irregardless of whether the final m.exit() is there or not). However:

import pace_python.pace
m = pace_python.pace.initialize()
sw = m.call('spinw', [], nargout=1)
sws = m.call('struct', [sw], nargout=1)
print(sws)

Does not segfault - suggesting it's something about the disp call...?