Skip to content

panic when playing examples with a UiCameraComponents since PR #572 #573

Description

@mockersf

since PR #572, I can't run my game or some examples (breakout, font_atlas_debug, text and ui are failing, 3d_scene, mouse_input_events, sprite, sprite_sheet are OK). I tried reverting to the commit before and it works.

It seems failures are happening when there is a UiCameraComponents (commenting it out in breakout example stops it from crashing)

RUST_BACKTRACE=1 cargo run --example breakout
    Finished dev [unoptimized + debuginfo] target(s) in 0.55s
     Running `target/debug/examples/breakout`
thread 'main' panicked at 'index 12 extends beyond limit 7', /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.0/src/backend/direct.rs:1323:35
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libstd/../stdarch/crates/std_detect/src/detect/os/x86.rs:253
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:217
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:526
  11: rust_begin_unwind
             at src/libstd/panicking.rs:437
  12: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:391
  13: <core::result::Result<T,E> as wgpu::backend::direct::PrettyResult<T>>::unwrap_pretty::{{closure}}
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.0/src/backend/direct.rs:1323
  14: core::result::Result<T,E>::unwrap_or_else
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/result.rs:853
  15: <core::result::Result<T,E> as wgpu::backend::direct::PrettyResult<T>>::unwrap_pretty
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.0/src/backend/direct.rs:1323
  16: <wgpu::backend::direct::Context as wgpu::Context>::command_encoder_end_render_pass
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.0/src/backend/direct.rs:1237
  17: <wgpu::RenderPass as core::ops::drop::Drop>::drop
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.6.0/src/lib.rs:2257
  18: core::ptr::drop_in_place
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:184
  19: core::ptr::drop_in_place
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/ptr/mod.rs:184
  20: <bevy_wgpu::renderer::wgpu_render_context::WgpuRenderContext as bevy_render::renderer::render_context::RenderContext>::begin_pass
             at crates/bevy_wgpu/src/renderer/wgpu_render_context.rs:151
  21: <bevy_render::render_graph::nodes::pass_node::PassNode<Q> as bevy_render::render_graph::node::Node>::update
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/encode.rs:124
  22: bevy_wgpu::renderer::wgpu_render_graph_executor::WgpuRenderGraphExecutor::execute
             at crates/bevy_wgpu/src/renderer/wgpu_render_graph_executor.rs:72
  23: bevy_wgpu::wgpu_renderer::WgpuRenderer::run_graph
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/panicking.rs:0
  24: bevy_wgpu::wgpu_renderer::WgpuRenderer::update
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/panicking.rs:0
  25: bevy_wgpu::wgpu_render_system::{{closure}}
             at crates/bevy_wgpu/src/lib.rs:41
  26: <F as bevy_ecs::system::into_system::ThreadLocalSystemFn>::run
             at ./crates/bevy_ecs/src/system/into_system.rs:343
  27: <F as bevy_ecs::system::into_system::IntoThreadLocalSystem>::thread_local_system::{{closure}}
             at ./crates/bevy_ecs/src/system/into_system.rs:319
  28: <bevy_ecs::system::into_system::SystemFn<State,F,ThreadLocalF,Init,SetArchetypeAccess> as bevy_ecs::system::system::System>::run_thread_local
             at ./crates/bevy_ecs/src/system/into_system.rs:65
  29: bevy_ecs::schedule::parallel_executor::ExecutorStage::run
             at crates/bevy_ecs/src/schedule/parallel_executor.rs:466
  30: bevy_ecs::schedule::parallel_executor::ParallelExecutor::run
             at crates/bevy_ecs/src/schedule/parallel_executor.rs:62
  31: bevy_app::app::App::update
             at crates/bevy_app/src/app.rs:62
  32: bevy_winit::winit_runner::{{closure}}
             at crates/bevy_winit/src/lib.rs:210
  33: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/boxed.rs:1088
  34: <cart_tmp_winit::platform_impl::platform::app_state::EventLoopHandler<T> as cart_tmp_winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/platform_impl/macos/app_state.rs:71
  35: cart_tmp_winit::platform_impl::platform::app_state::Handler::handle_nonuser_event
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/platform_impl/macos/app_state.rs:173
  36: cart_tmp_winit::platform_impl::platform::app_state::AppState::cleared
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/platform_impl/macos/app_state.rs:331
  37: cart_tmp_winit::platform_impl::platform::observer::control_flow_end_handler
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/platform_impl/macos/observer.rs:135
  38: _ZL12preoptimized
  39: _ZL12preoptimized
  40: _ZL12preoptimized
  41: _ZL12preoptimized
  42: _ZL12preoptimized
  43: _ZL12preoptimized
  44: _ZL12preoptimized
  45: _ZL12preoptimized
  46: _ZL12preoptimized
  47: _ZL12preoptimized
  48: <() as objc::message::MessageArguments>::invoke
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/mod.rs:128
  49: objc::message::platform::send_unverified
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/apple/mod.rs:27
  50: objc::message::send_message
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/message/mod.rs:178
  51: cart_tmp_winit::platform_impl::platform::event_loop::EventLoop<T>::run_return
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/objc-0.2.7/src/macros.rs:133
  52: cart_tmp_winit::platform_impl::platform::event_loop::EventLoop<T>::run
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/platform_impl/macos/event_loop.rs:91
  53: cart_tmp_winit::event_loop::EventLoop<T>::run
             at /Users/francois/.cargo/registry/src/github.com-1ecc6299db9ec823/cart-tmp-winit-0.22.2/src/event_loop.rs:149
  54: bevy_winit::run
             at crates/bevy_winit/src/lib.rs:40
  55: bevy_winit::winit_runner
             at crates/bevy_winit/src/lib.rs:218
  56: core::ops::function::Fn::call
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/ops/function.rs:72
  57: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/boxed.rs:1095
  58: bevy_app::app::App::run
             at crates/bevy_app/src/app.rs:78
  59: bevy_app::app_builder::AppBuilder::run
             at crates/bevy_app/src/app_builder.rs:45
  60: breakout::main
             at examples/game/breakout.rs:9
  61: std::rt::lang_start::{{closure}}
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
  62: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  63: std::panicking::try::do_call
             at src/libstd/panicking.rs:348
  64: std::panicking::try
             at src/libstd/panicking.rs:325
  65: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  66: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  67: std::rt::lang_start
             at /Users/francois/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67
  68: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions