Hello
I have a SegFault when I call the the initSystem method. Here is a minimalistic code that creates the problem here (Ubuntu 18.04, OpenSim compiled from the last commit of master branch in the superbuild mode with RelWithDebInfo).
model = osim.Model(f'{PATH_TO_OPENSIM_FOLDER}/Sandbox/MatlabScripts/gait2354_simbody.osim')
model.buildSystem()
model.initializeState()
Is that an "expected" behavior? (In the sense that I don't use the API properly?
SegFault when using initSystem in python [SOLVED]
- Benjamin Michaud
- Posts: 31
- Joined: Mon May 03, 2010 6:35 am
SegFault when using initSystem in python [SOLVED]
Last edited by Benjamin Michaud on Tue Oct 23, 2018 7:56 am, edited 1 time in total.
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: SegFault when using initSystem in python
Hi Benjamin,
Crashing quietly is not expected behavior, crashing for a reason should throw an exception with an informative message. Is this off-the-shelf model in 4.0? Keep in mind that the latest commit in master is bleeding edge and so it may not handle old files gracefully but would be very important to us to track down.
Do you get a stacktrace, and would you mind sharing it? Also why not just call initSystem() directly?
Thank you,
-Ayman
Crashing quietly is not expected behavior, crashing for a reason should throw an exception with an informative message. Is this off-the-shelf model in 4.0? Keep in mind that the latest commit in master is bleeding edge and so it may not handle old files gracefully but would be very important to us to track down.
Do you get a stacktrace, and would you mind sharing it? Also why not just call initSystem() directly?
Thank you,
-Ayman
- Benjamin Michaud
- Posts: 31
- Joined: Mon May 03, 2010 6:35 am
Re: SegFault when using initSystem in python
Hi Ayman,
Thanks for your answer. I tried this code with 2 different models. The one we use (which is a Wu for Osim 3.3 that has been updated) and a random one in the Sandbox folder from master branch (I expected this one to work fine).
I unfortunately there is no stacktrace which is thrown. I just get a :
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Thanks for your answer. I tried this code with 2 different models. The one we use (which is a Wu for Osim 3.3 that has been updated) and a random one in the Sandbox folder from master branch (I expected this one to work fine).
I unfortunately there is no stacktrace which is thrown. I just get a :
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- Benjamin Michaud
- Posts: 31
- Joined: Mon May 03, 2010 6:35 am
Re: SegFault when using initSystem in python
I recompiled opensim on another computer and don't get anymore the segfault... I don't know what the problem was, but I think my conda environment was a bit messed up because of the ipopt installation (which interacted with the blas library)