dbrnz / opencor

OpenCOR is a cross-platform modelling environment which can be used to organise, edit, simulate and analyse CellML files.
http://www.opencor.ws/
GNU General Public License v3.0
1 stars 0 forks source link

Python: segfault when using sys.exit #27

Closed hsorby closed 5 years ago

hsorby commented 5 years ago

When I try and use sys.exit I get a segmentation fault. This script illustrates the issue

import sys
import OpenCOR

if __name__ == "__main__":
    sys.exit(3)

When I run on Ubuntu with the following command:

./OpenCOR-2019-05-23-Linux/bin/OpenCOR -c PythonRunScript::script test.py

The resulting output is

Segmentation fault

with a return code of 139.

dbrnz commented 5 years ago

@hsorby, this is now awaiting opencor/#2107.

dbrnz commented 5 years ago

Fixed in the new release here. OpenCOR now returns the exit code (set by sys.exit()) to the invoking shell.