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 debug contact count not being initialized when using Jolt Physics #101231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Jan 7, 2025

Fixes #101212.

This adds a zeroing out of the JoltContactListener3D::debug_contact_count member variable.

Without this you would (at least with the libstdc++ implementation of std::atomic) end up with a random (typically large) value on the first engine iteration in optimized builds, which caused out-of-bounds crashes when using the "Visible Collision Shapes" debug option, aka --debug-collisions.

@mihe mihe added this to the 4.4 milestone Jan 7, 2025
@mihe mihe requested a review from a team as a code owner January 7, 2025 16:24
@mihe mihe added the crash label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JoltPhysics3D: Debug visible collisions crash
1 participant