Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bevy_wgpu panics on minimizing a running window. #2168

Closed
james7132 opened this issue May 15, 2021 · 2 comments
Closed

bevy_wgpu panics on minimizing a running window. #2168

james7132 opened this issue May 15, 2021 · 2 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior

Comments

@james7132
Copy link
Member

Bevy version

Current HEAD (73f4a9d1)

Operating system & version

Windows 10 v19042.985

What you did

Minimized a live window with the running game.

What you expected to happen

bevy_wgpu would not panic.

What actually happened

bevy_wgpu panicked.

Additional information

Full stack trace.

thread 'main' panicked at 'Index 0 is already occupied', C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-core-0.8.1\src\hub.rs:169:18
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:493
   1: std::panicking::begin_panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:435
   2: wgpu_core::hub::Storage<wgpu_core::swap_chain::SwapChain<gfx_backend_vulkan::Backend>, wgpu_core::id::Id<wgpu_core::swap_chain::SwapChain<gfx_backend_empty::Backend>>>::insert_impl<wgpu_core::swap_chain::SwapChain<gfx_backend_vulkan::Backend>,wgpu_core::i
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-core-0.8.1\src\hub.rs:169
   3: wgpu_core::hub::Storage<wgpu_core::swap_chain::SwapChain<gfx_backend_vulkan::Backend>, wgpu_core::id::Id<wgpu_core::swap_chain::SwapChain<gfx_backend_empty::Backend>>>::insert_error<wgpu_core::swap_chain::SwapChain<gfx_backend_vulkan::Backend>,wgpu_core::
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-core-0.8.1\src\hub.rs:180
   4: wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::device_create_swap_chain<wgpu_core::hub::IdentityManagerFactory,gfx_backend_vulkan::Backend>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-core-0.8.1\src\device\mod.rs:4510
   5: wgpu::backend::direct::{{impl}}::device_create_swap_chain
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.8.1\src\backend\direct.rs:794
   6: wgpu::Device::create_swap_chain
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.8.1\src\lib.rs:1659
   7: bevy_wgpu::renderer::wgpu_render_resource_context::{{impl}}::create_swap_chain
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\renderer\wgpu_render_resource_context.rs:369     
   8: bevy_render::render_graph::nodes::window_swapchain_node::{{impl}}::update
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_render\src\render_graph\nodes\window_swapchain_node.rs:65 
   9: bevy_wgpu::renderer::wgpu_render_graph_executor::WgpuRenderGraphExecutor::execute
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\renderer\wgpu_render_graph_executor.rs:75        
  10: bevy_wgpu::wgpu_renderer::{{impl}}::run_graph::{{closure}}
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\wgpu_renderer.rs:121
  11: bevy_ecs::world::World::resource_scope<bevy_render::render_graph::graph::RenderGraph,tuple<>,closure-0>
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_ecs\src\world\mod.rs:715
  12: bevy_wgpu::wgpu_renderer::WgpuRenderer::run_graph
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\wgpu_renderer.rs:110
  13: bevy_wgpu::wgpu_renderer::WgpuRenderer::update
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\wgpu_renderer.rs:127
  14: bevy_wgpu::get_wgpu_render_system::{{closure}}
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_wgpu\src\lib.rs:128
  15: alloc::boxed::{{impl}}::call_mut<tuple<mut bevy_ecs::world::World*>,FnMut<tuple<mut bevy_ecs::world::World*>>,alloc::alloc::Global>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\boxed.rs:1528
  16: bevy_ecs::system::exclusive_system::{{impl}}::run
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_ecs\src\system\exclusive_system.rs:41
  17: bevy_ecs::schedule::stage::{{impl}}::run
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_ecs\src\schedule\stage.rs:812
  18: bevy_ecs::schedule::Schedule::run_once
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_ecs\src\schedule\mod.rs:208
  19: bevy_ecs::schedule::{{impl}}::run
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_ecs\src\schedule\mod.rs:226
  20: bevy_app::app::App::update
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_app\src\app.rs:62
  21: bevy_winit::winit_runner_with::{{closure}}
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_winit\src\lib.rs:484
  22: winit::platform_impl::platform::event_loop::{{impl}}::run_return::{{closure}}<tuple<>,closure-1>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:203
  23: alloc::boxed::{{impl}}::call_mut<tuple<winit::event::Event<tuple<>>, mut winit::event_loop::ControlFlow*>,FnMut<tuple<winit::event::Event<tuple<>>, mut winit::event_loop::ControlFlow*>>,alloc::alloc::Global>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\boxed.rs:1528
  24: winit::platform_impl::platform::event_loop::runner::{{impl}}::call_event_handler::{{closure}}<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:245
  25: std::panic::{{impl}}::call_once<tuple<>,closure-0>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:344
  26: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,tuple<>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:379
  27: winit::platform_impl::platform::window::TASKBAR_LIST::__getit
  28: std::panicking::try<tuple<>,std::panic::AssertUnwindSafe<closure-0>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:343
  29: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,tuple<>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:431
  30: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::catch_unwind<tuple<>,tuple<>,closure-0>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:152
  31: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::call_event_handler<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:239
  32: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::move_state_to<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:341
  33: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::main_events_cleared<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:227
  34: winit::platform_impl::platform::event_loop::flush_paint_messages<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:676
  35: winit::platform_impl::platform::event_loop::thread_event_target_callback::{{closure}}<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:1967
  36: std::panic::{{impl}}::call_once<isize,closure-0>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:344
  37: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,isize>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:379
  38: winit::platform_impl::platform::window::TASKBAR_LIST::__getit
  39: std::panicking::try<isize,std::panic::AssertUnwindSafe<closure-0>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:343
  40: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,isize>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:431
  41: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<tuple<>>::catch_unwind<tuple<>,isize,closure-0>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop\runner.rs:152
  42: winit::platform_impl::platform::event_loop::thread_event_target_callback<tuple<>>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:2151
  43: DefSubclassProc
  45: CallWindowProcW
  46: DispatchMessageW
  47: SendMessageTimeoutW
  48: KiUserCallbackDispatcher
  49: NtUserDispatchMessage
  50: DispatchMessageW
  51: winit::platform_impl::platform::event_loop::EventLoop<tuple<>>::run_return<tuple<>,closure-1>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:218
  52: winit::platform_impl::platform::event_loop::EventLoop<tuple<>>::run<tuple<>,closure-1>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\platform_impl\windows\event_loop.rs:188
  53: winit::event_loop::EventLoop<tuple<>>::run<tuple<>,closure-1>
             at C:\Users\James\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.24.0\src\event_loop.rs:154
  54: bevy_winit::run<closure-1>
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_winit\src\lib.rs:170
  55: bevy_winit::winit_runner_with
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_winit\src\lib.rs:492
  56: bevy_winit::winit_runner
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_winit\src\lib.rs:210
  57: core::ops::function::Fn::call<fn(bevy_app::app::App),tuple<bevy_app::app::App>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:70
  58: alloc::boxed::{{impl}}::call<tuple<bevy_app::app::App>,Fn<tuple<bevy_app::app::App>>,alloc::alloc::Global>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\boxed.rs:1535
  59: bevy_app::app::App::run
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_app\src\app.rs:72
  60: bevy_app::app_builder::AppBuilder::run
             at C:\Users\James\.cargo\git\checkouts\bevy-f7ffde730c324c74\73f4a9d\crates\bevy_app\src\app_builder.rs:70
  61: fc::main
             at .\game\src\main.rs:94
  62: core::ops::function::FnOnce::call_once<fn(),tuple<>>
             at C:\Users\James\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:227
@james7132 james7132 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 15, 2021
@alyti
Copy link

alyti commented May 15, 2021

Related to #1882 and countless others

@james7132
Copy link
Member Author

Duplicate of #2018.

@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in and removed S-Needs-Triage This issue needs to be labelled labels Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

3 participants