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

Prevent panic when despawning entities with NoAuto components #608

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

ramirezmike
Copy link
Contributor

Objective

Solution

This solution to the problem just uses the non-panicking versions of retrieving an entity from the world and inserting a component in the on_remove_no_auto_mass_property function that runs when the component is removed.

I think an argument could be made that this silently hides an issue of code trying to operate on an entity that no longer exists or that the on_remove shouldn't fire if it's happening because an entity is being despawned.

@Jondolf Jondolf added A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on P-Crash A sudden unexpected crash labels Dec 28, 2024
@Jondolf Jondolf merged commit 2ebab52 into Jondolf:main Dec 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Despawning Entities that have a NoAutoCenterOfMass, NoAutoAngularInertia, or NoAutoMass component causes panic
2 participants