WARN bevy_editor_pls_default_windows::cameras: editor viewport size is infinite
From set_main_pass_viewport which results in bevy's ui crashing:
attempt to add with overflow
stack backtrace:
thread 'Compute Task Pool (4)' panicked at /Users/dylan.owen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/glam-0.25.0/src/u32/uvec2.rs:521:23:
attempt to add with overflow
0: rust_begin_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:144:5
3: <u32 as core::ops::arith::Add>::add
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/arith.rs:103:45
4: <glam::u32::uvec2::UVec2 as core::ops::arith::Add>::add
at /Users/dylan.owen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/glam-0.25.0/src/u32/uvec2.rs:521:16
5: bevy_render::camera::camera::Camera::physical_viewport_rect
at /Users/dylan.owen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.0/src/camera/camera.rs:254:19
6: bevy_ui::render::extract_default_ui_camera_view
at /Users/dylan.owen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ui-0.13.0/src/render/mod.rs:512:13
We set the viewport initially to Infinity and then update it under: bevy_editor_pls_core-0.8.0/src/editor.rs:529 which seems like it should be called before set_main_pass_viewport:
Which has no ordering in relation to Editor::system that I am aware of. Even with an ordering of set_editor_cam_active and Editor::system that still wouldn't be enough. editor_controls_system activates the Editor initially which kicks this whole thing off and it's possible for Editor::system to run, then editor_controls_system then set_editor_cam_active.
but these systems aren't even in the same crates. Maybe the easiest option is to set our viewport to 640x480 initially, we'll get a flicker in scenarios like this but nothing will crash. Also we'll still get a warning if the viewport is changed to be infinity (and probably a crash).
I've been hitting this error intermittently:
From
set_main_pass_viewport
which results in bevy's ui crashing:We set the viewport initially to Infinity and then update it under:
bevy_editor_pls_core-0.8.0/src/editor.rs:529
which seems like it should be called beforeset_main_pass_viewport
:However we actually activate our camera as part of:
Which has no ordering in relation to
Editor::system
that I am aware of. Even with an ordering ofset_editor_cam_active
andEditor::system
that still wouldn't be enough.editor_controls_system
activates the Editor initially which kicks this whole thing off and it's possible forEditor::system
to run, theneditor_controls_system
thenset_editor_cam_active
.What I think we would really need would be something like
but these systems aren't even in the same crates. Maybe the easiest option is to set our viewport to 640x480 initially, we'll get a flicker in scenarios like this but nothing will crash. Also we'll still get a warning if the viewport is changed to be infinity (and probably a crash).