Closed kylemiller3 closed 1 year ago
Can you provide more info? The stack trace and error message would be helpful in tracking down what causes this. Off the top of my head I can't think of anything specific and I have used Kayak along side egui without problems.
If I had to guess the widget entities are being added to the world and bevy_editor_pls
can't reflect all of them correctly?
It crashes as soon as run() is called according to the trace and gets into deep Bevy internals. I can confirm that bevy_editor_pls
does work with egui as well.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.7.0/src/schedule_graph/mod.rs:602:14
stack backtrace:
0: 0x101dc85fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hacdfc7a7ba1f3921
1: 0x101e1b3f4 - core::fmt::write::h5204bfb3e3f67d71
2: 0x101dbe244 - std::io::Write::write_fmt::h2962204ca0f57254
3: 0x101dc8410 - std::sys_common::backtrace::print::hae2682ac3efa1710
4: 0x101dcae98 - std::panicking::default_hook::{{closure}}::h6e1b39797d538a85
5: 0x101dcabf0 - std::panicking::default_hook::h2cfb0b57666dfacb
6: 0x101dcb454 - std::panicking::rust_panic_with_hook::h0ff1de35c9ad4a9d
7: 0x101dcb348 - std::panicking::begin_panic_handler::{{closure}}::hb584af3e9d5aa6d0
8: 0x101dc8a1c - std::sys_common::backtrace::__rust_end_short_backtrace::h3c50e4b586dd2b4b
9: 0x101dcb0e4 - _rust_begin_unwind
10: 0x101e46658 - core::panicking::panic_fmt::h0ba5d599d3cf07dc
11: 0x101e466c8 - core::panicking::panic::h935e6ef675b0c466
12: 0x1001eb744 - core::option::Option<T>::unwrap::hd181915e57c726f6
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/option.rs:988:21
13: 0x1001eb744 - bevy_mod_debugdump::schedule_graph::ScheduleGraphContext::system_of_system_type::h196867f0ad1f1aa1
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.7.0/src/schedule_graph/mod.rs:602:14
14: 0x1001eb744 - bevy_mod_debugdump::schedule_graph::ScheduleGraphContext::node_ref::h49ccf47f8530c027
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.7.0/src/schedule_graph/mod.rs:622:39
15: 0x1001e8c84 - bevy_mod_debugdump::schedule_graph::ScheduleGraphContext::add_dependencies::h4a28db43fae98577
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.7.0/src/schedule_graph/mod.rs:247:18
16: 0x1001e8c84 - bevy_mod_debugdump::schedule_graph::schedule_graph_dot::h0be29d6665d4fb54
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_mod_debugdump-0.7.0/src/schedule_graph/mod.rs:163:5
17: 0x100156328 - bevy_editor_pls_default_windows::debug_settings::debugdump::setup::h0ea93a184640f808
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_editor_pls_default_windows-0.4.0/src/debug_settings/debugdump.rs:48:32
18: 0x100116244 - <bevy_app::app::App as bevy_editor_pls_core::AddEditorWindow>::add_editor_window::h64aeca14b2876475
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_editor_pls_core-0.4.0/src/lib.rs:31:9
19: 0x100116244 - <bevy_editor_pls::EditorPlugin as bevy_app::plugin::Plugin>::build::h98a134d421d51565
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_editor_pls-0.4.0/src/lib.rs:117:13
20: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::{{closure}}::hcf798dd70b4e514f
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:55
21: 0x106d2c904 - core::ops::function::FnOnce::call_once::hf6ccb1cf4ef13b4c
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/ops/function.rs:250:5
22: 0x106d2c904 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h18b792bb2ec86843
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/panic/unwind_safe.rs:271:9
23: 0x106d2c904 - std::panicking::try::do_call::hbbb326bd27b225f4
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:487:40
24: 0x106d2c904 - std::panicking::try::h58b8f9aa3b64be2e
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:451:19
25: 0x106d2c904 - std::panic::catch_unwind::haa51bc759b9ea972
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panic.rs:140:14
26: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::h73d8ed57fcb3eac7
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:22
27: 0x1000d395c - bevy_app::app::App::add_plugin::h6bf5b059649bd134
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:747:15
28: 0x1000c8a04 - <cool_game::debug::DebugPlugin as bevy_app::plugin::Plugin>::build::h89f72c4e4c330553
at /Users/k/Code/cool-game/src/debug.rs:16:9
29: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::{{closure}}::hcf798dd70b4e514f
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:55
30: 0x106d2c904 - core::ops::function::FnOnce::call_once::hf6ccb1cf4ef13b4c
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/ops/function.rs:250:5
31: 0x106d2c904 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h18b792bb2ec86843
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/panic/unwind_safe.rs:271:9
32: 0x106d2c904 - std::panicking::try::do_call::hbbb326bd27b225f4
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:487:40
33: 0x106d2c904 - std::panicking::try::h58b8f9aa3b64be2e
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:451:19
34: 0x106d2c904 - std::panic::catch_unwind::haa51bc759b9ea972
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panic.rs:140:14
35: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::h73d8ed57fcb3eac7
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:22
36: 0x1000a7598 - bevy_app::app::App::add_plugin::h9c03fe2f4df52b12
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:747:15
37: 0x1000a7598 - <cool_game::GamePlugin as bevy_app::plugin::Plugin>::build::he0d600b63ec7ff5f
at /Users/k/Code/cool-game/src/lib.rs:46:9
38: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::{{closure}}::hcf798dd70b4e514f
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:55
39: 0x106d2c904 - core::ops::function::FnOnce::call_once::hf6ccb1cf4ef13b4c
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/ops/function.rs:250:5
40: 0x106d2c904 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h18b792bb2ec86843
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/panic/unwind_safe.rs:271:9
41: 0x106d2c904 - std::panicking::try::do_call::hbbb326bd27b225f4
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:487:40
42: 0x106d2c904 - std::panicking::try::h58b8f9aa3b64be2e
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panicking.rs:451:19
43: 0x106d2c904 - std::panic::catch_unwind::haa51bc759b9ea972
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/panic.rs:140:14
44: 0x106d2c904 - bevy_app::app::App::add_boxed_plugin::h73d8ed57fcb3eac7
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:767:22
45: 0x100026898 - bevy_app::app::App::add_plugin::h3850a694b866d9eb
at /Users/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_app-0.10.1/src/app.rs:747:15
46: 0x100026898 - cool_game::main::h2832868182304a5c
at /Users/k/Code/cool-game/src/main.rs:26:5
47: 0x100061370 - core::ops::function::FnOnce::call_once::h735d4479e1cba8a3
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/core/src/ops/function.rs:250:5
48: 0x100061370 - std::sys_common::backtrace::__rust_begin_short_backtrace::h011f7bdb3e6f7a56
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/sys_common/backtrace.rs:134:18
49: 0x1000775fc - std::rt::lang_start::{{closure}}::h8565ec3ae52d2363
at /rustc/511364e7874dba9649a264100407e4bffe7b5425/library/std/src/rt.rs:166:18
50: 0x101db1d30 - std::rt::lang_start_internal::h8a4901aae8fe93a3
51: 0x100026bdc - _main
Looks like there is some useful stuff. Possibly a bevy_editor_pls
issue according to the logs.
I have recreated the crash here
Add .add_plugin(EditorPlugin::default())
before .add_plugin(KayakContextPlugin).add_plugin(KayakWidgets)
use bevy::prelude::*;
use bevy_editor_pls::EditorPlugin;
use kayak_ui::{widgets::KayakWidgets, prelude::KayakContextPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(EditorPlugin::default())
.add_plugin(KayakContextPlugin)
.add_plugin(KayakWidgets)
.run();
}
see an example of correct working: https://gist.github.com/Yairama/7139c2ec8e183dda7b1f8077d6d1b30e
It does not work quite correctly for TextBundle. Adding this code
<TextWidgetBundle
text={TextProps {
content: "Hello World".into(),
size: 20.0,
..Default::default()
}}
/>
Will not display with both enabled. It does work without bevy_editor_pls
Looks like it was just under the UI.
These plugins seem incompatible. Any idea off the top of your head what the issue could? They both deal with UI maybe plugins are getting double loaded? I should be able to make a minimal example but I think merely loading the plugins together will cause this issue and give a nasty stack trace that doesn't seem very helpful. Very long call stack something about not expecting a none value.