Jim Stanev has had a similar issue; see https://simtk.org/forums/viewtopic.php? ... nev#p15196.
Maybe try adding `find_package(Simbody)` to your CMakeLists.txt (and also make sure it finds the correct Simbody).
Segfault on initSystem
- Leonardo Consoni
- Posts: 2
- Joined: Wed Nov 18, 2015 4:34 am
Re: Segfault on initSystem
I'm having a plain segfault on initSystem as well, for SimTK 3.5.3 and OpenSim 3.3 release libraries on a small test program, on Arch Linux 64-bit.
Based on the comments here, I tried to build a debug version of the libraries and use it on my program (confirmed the debug libraries are being linked with ldd). Now I'm getting the following error on initSystem:
"[...]include/simbody/internal/common.h:95: bool SimTK::MobilizedBodyIndex::operator<(int) const: Assertion `isValidExtended() && isValidExtended(i)' failed."
Is this related to the error reported on this topic ?
Edit: Found out that the assertion problem was caused by an issue in the model, so please ignore it. Besides, after some testing, the segfault was gone when I disabled the optimizations (-Ox ) for the release build of OpenSim libraries (SimTK is fine with -O2).
Based on the comments here, I tried to build a debug version of the libraries and use it on my program (confirmed the debug libraries are being linked with ldd). Now I'm getting the following error on initSystem:
"[...]include/simbody/internal/common.h:95: bool SimTK::MobilizedBodyIndex::operator<(int) const: Assertion `isValidExtended() && isValidExtended(i)' failed."
Is this related to the error reported on this topic ?
Edit: Found out that the assertion problem was caused by an issue in the model, so please ignore it. Besides, after some testing, the segfault was gone when I disabled the optimizations (-Ox ) for the release build of OpenSim libraries (SimTK is fine with -O2).