-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Despawning a child UI node causes a panic #267
Comments
I don't appear to have permission to label issues, so for whoever is triaging: Suggested Labels: Potential Label: |
·············································· // first, make the entity's own parent forget about it
if let Ok(parent) = world.get::<Parent>(entity).map(|parent| parent.0) {
if let Ok(mut children) = world.get_mut::<Children>(parent) {
children.retain(|c| *c != entity);
}
} |
Testing this in 0.5 the Example no longer panics, but still produces a Warning: Updated minimal example:
|
I have the same issue. But @Cupnfish |
This can probably be closed, pretty ancient and |
Attempting to despawn an entity that is a UI node child of another UI node causes a panic.
Example Reproduction
Running this with
RUST_BACKTRACE=1 cargo run
produces:The crashing line is
bevy/crates/bevy_ui/src/flex/mod.rs
Line 86 in db1bf64
We appear to be attempting to fetch a stretch node that doesn't exist in the
entities_to_stretch
map. The calling code isThe text was updated successfully, but these errors were encountered: