Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bullet related segfaults on macOS (#504)
This fixes two tests with segfaults on macOS * COMMON_TEST_simulation_features_bullet-featherstone: The failure appears to be due to the destruction order of the triangleMeshes and meshesGImpact containers. Per [this] (Should btBroadphaseInterface destructor remove itself from btCollisionObject broadphase proxies? bulletphysics/bullet3#567 (comment)) comment, memory in bullet is sensitive to order of destruction. meshesGImpact objects contain pointers to items contained bytriangleMeshes, so the solution is to ensure meshesGImpact is destructed before triangleMeshes. * INTEGRATION_DoublePendulum: This is a DART test, but the segfault seems to be related to Bullet. I found that even after removing all the code in DARTDoublePendulum.cc, the segfault still occurs as long as it's linked with libdart-collision-bullet. Since the test doesn't need the bullet collision detector, I've opted to just remove the library from the DART_LIBRARIES variable. I still don't know the root cause though, so this might affect the actual dartsim-plugin library. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
- Loading branch information