Skip to content

figure_size() still crashes with segmentation fault #258

@skabaw

Description

@skabaw

Following the closed issue #114, I still get a segmentation fault on call to figure_size(). I get the error on one machine and not on the other. Both running Ubuntu and gcc. The error I guess happens at the following call inside figure_size():

PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_figure, ....

but it manifests itself only at the main() program exit. It means that the error causing call of figure_size() does not affect program execution following the call, e.g, plot() and show(). I believe, it is someway related to freeing resources, however, I cannot inspect the library function PyObject_Call() to find more.

The issue is manifested on Ubuntu 20.04 w/Python 3.8, while it doesn't show up on Ubuntu 18.04 w/Python 3.6.

Apparently, the fault also happens when the call to figure_size() is not explicit but implicit, possibly with a call to plot() or show(). On the other hand, a plain main() program consisting of a single call to figure_size() is sufficient to get the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions