bevy
bevy copied to clipboard
`Taffy` crashes
Bevy version
bevy = "0.15.0"
What you did
I am making dagerfall inspired game and it's quite basic but providing minimal code might be pretty hard. This only happens after I pick and place item in inventory. This code involves changing parent/child with bevy built-in commands. Then I hit escape which bring-ups menu and then I go to main menu which causes automatic entity/resource/etc clean-up but here it crashes.
What went wrong
thread 'Compute Task Pool (14)' panicked at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\taffy-0.5.2\src\tree\taffy_tree.rs:447:29:
invalid SlotMap key used
stack backtrace:
0: std::panicking::begin_panic<ref$<str$> >
at C:\Users\Phoqinu\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:737
1: slotmap::basic::impl$9::index_mut<slotmap::DefaultKey,enum2$<core::option::Option<taffy::tree::node::NodeId> > >
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\slotmap-1.0.7\src\basic.rs:936
2: taffy::tree::taffy_tree::TaffyTree<enum2$<bevy_ui::measurement::NodeMeasure> >::remove<enum2$<bevy_ui::measurement::NodeMeasure> >
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\taffy-0.5.2\src\tree\taffy_tree.rs:447
3: bevy_ui::layout::ui_surface::UiSurface::remove_camera_entities<core::iter::adapters::map::Map<core::iter::adapters::flatten::Flatten<core::option::IntoIter<core::iter::adapters::cloned::Cloned<bevy_ecs::event::iterators::EventIterator<bevy_ecs::removal_det
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ui-0.15.0\src\layout\ui_surface.rs:261
4: bevy_ui::layout::ui_layout_system
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ui-0.15.0\src\layout\mod.rs:241
5: core::ops::function::FnMut::call_mut<void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::system::system_param::Local<bevy_ui::layout::UiLayoutSystemBuffers>,bevy_ecs::system::query::Query<tuple$<bevy_ecs::entity::Entity,ref$<bevy_window::window::Window
at C:\Users\Phoqinu\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:166
6: core::ops::function::impls::impl$3::call_mut<tuple$<bevy_ecs::system::commands::Commands,bevy_ecs::system::system_param::Local<bevy_ui::layout::UiLayoutSystemBuffers>,bevy_ecs::system::query::Query<tuple$<bevy_ecs::entity::Entity,ref$<bevy_window::window::
at C:\Users\Phoqinu\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:294
7: bevy_ecs::system::function_system::impl$63::run::call_inner<tuple$<>,bevy_ecs::system::commands::Commands,bevy_ecs::system::system_param::Local<bevy_ui::layout::UiLayoutSystemBuffers>,bevy_ecs::system::query::Query<tuple$<bevy_ecs::entity::Entity,ref$<bevy
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.15.0\src\system\function_system.rs:939
8: bevy_ecs::system::function_system::impl$63::run<tuple$<>,void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::system::system_param::Local<bevy_ui::layout::UiLayoutSystemBuffers>,bevy_ecs::system::query::Query<tuple$<bevy_ecs::entity::Entity,ref$<bevy_wi
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.15.0\src\system\function_system.rs:942
9: bevy_ecs::system::function_system::impl$9::run_unsafe<void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::system::system_param::Local<bevy_ui::layout::UiLayoutSystemBuffers>,bevy_ecs::system::query::Query<tuple$<bevy_ecs::entity::Entity,ref$<bevy_windo
at C:\Users\Phoqinu\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.15.0\src\system\function_system.rs:737
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `bevy_ui::layout::ui_layout_system`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
Additional information
You can contact me at Discord - username: phoqinu - and I will share my project.
Or If you need anything else.