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 crashes with CollisionObject3D debug shapes #47848

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

MeshInstance nodes added as child nodes for CollisionObject3D debug shapes can be invalidated while deleting the collision object (child nodes are deleted first), which caused accesses to invalid memory in shape_owner_remove_shape that lead to random crashes.

Also optimized accesses to shapes to avoid copy-on-write on each iteration.

Regression from #45783

MeshInstance added as child nodes for CollisionObject debug shapes can
be invalidated while deleting the collision object (child nodes are
deleted first), which caused accesses to invalid memory in
shape_owner_remove_shape that lead to random crashes.

Also optimized accesses to shapes to avoid copy-on-write on each
iteration.
@akien-mga akien-mga merged commit b406061 into godotengine:master Apr 13, 2021
@akien-mga
Copy link
Member

Thanks!

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.

2 participants