jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.12k stars 166 forks source link

Egui Docked Example Crashes #126

Closed mwbryant closed 1 year ago

mwbryant commented 1 year ago

I'm trying out version 0.18 and when running the docked example it crashes with:

thread 'main' panicked at 'No fonts available until first call to Context::run()', /home/matthew/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-0.21.0/src/context.rs:412:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'Compute Task Pool (8)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', /home/matthew/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.10.0/src/schedule/executor/multi_threaded.rs:194:60
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/matthew/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.0/src/task_pool.rs:376:49

Same error happens when I try to integrate this into my project

jakobhellermann commented 1 year ago

Fixed in https://github.com/jakobhellermann/bevy-inspector-egui/commit/acb000ae3c1341b5e48389fedd8e97bf329bd106.

The show_ui_system was in PreUpdate but not explicitly before the EguiSystem::BeginFrame. Instead I moved into PostUpdate before EguiSystem::ProcessOutput.