Skip to content

Segfault on exit on Linux #3

@mducle

Description

@mducle

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...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions