Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bullet related segfaults on macOS #504

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Apr 6, 2023

🦟 Bug fix

Fixes #497

Summary

This fixes two tests with segfaults on macOS

  1. 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.
  2. 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.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey requested review from mxgrey and scpeters as code owners April 6, 2023 18:38
@github-actions github-actions bot added 🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic labels Apr 6, 2023
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #504 (03f93c7) into gz-physics6 (12baaf7) will not change coverage.
The diff coverage is n/a.

❗ Current head 03f93c7 differs from pull request most recent head f2b1d36. Consider uploading reports for the commit f2b1d36 to get more accurate results

@@             Coverage Diff              @@
##           gz-physics6     #504   +/-   ##
============================================
  Coverage        75.50%   75.50%           
============================================
  Files              142      142           
  Lines             7173     7173           
============================================
  Hits              5416     5416           
  Misses            1757     1757           
Impacted Files Coverage Δ
bullet-featherstone/src/Base.hh 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@azeey
Copy link
Contributor Author

azeey commented Apr 7, 2023

The windows warnings are coming from gz-math and I believe are fixed by gazebosim/gz-math#529

@azeey azeey merged commit 35d02fe into gazebosim:gz-physics6 Apr 7, 2023
@azeey azeey deleted the fix_macos_segfaults branch April 7, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

🧑‍🌾 Segfaults in Homebrew CI cause test failures
2 participants