Skip to content

Prevent panic when despawning entities with NoAuto components#608

Merged
Jondolf merged 1 commit into
avianphysics:mainfrom
ramirezmike:main
Dec 28, 2024
Merged

Prevent panic when despawning entities with NoAuto components#608
Jondolf merged 1 commit into
avianphysics:mainfrom
ramirezmike:main

Conversation

@ramirezmike

Copy link
Copy Markdown
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
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