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

Use of bevy_ecs_tilemap causes application crash on window minimize (Windows) #181

Closed
LeonardMH opened this issue Apr 21, 2022 · 3 comments
Labels
wontfix This will not be worked on

Comments

@LeonardMH
Copy link

LeonardMH commented Apr 21, 2022

Any usage of bevy_ecs_tilemap seems to cause the application to crash when the application window is minimized. This is reproducible using the built in map example with $env:RUST_BACKTRACE=1; cargo run --release --example map.

Backtrace below:

thread 'main' panicked at 'view entity should exist: QueryDoesNotMatch(0v0)', C:\Users\leonardmh\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_core_pipeline-0.7.0\src\main_pass_2d.rs:45:14
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src\panicking.rs:143
   2: core::result::unwrap_failed
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src\result.rs:1749
   3: <bevy_core_pipeline::main_pass_2d::MainPass2dNode as bevy_render::render_graph::node::Node>::run
   4: bevy_ecs::storage::sparse_set::SparseSet<I,V>::get_or_insert_with
   5: bevy_ecs::storage::sparse_set::SparseSet<I,V>::get_or_insert_with
   6: bevy_render::renderer::render_system
   7: <bevy_ecs::system::exclusive_system::ExclusiveSystemFn<F> as bevy_ecs::system::exclusive_system::ExclusiveSystem>::run
   8: <bevy_ecs::schedule::stage::SystemStage as bevy_ecs::schedule::stage::Stage>::run
   9: core::mem::drop
  10: bevy_app::app::App::update
  11: winit::platform_impl::platform::event_loop::EventLoop<T>::run_return
  12: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  13: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<T>::send_event
  14: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<T>::move_state_to
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  16: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<T>::catch_unwind
  17: winit::platform_impl::platform::event_loop::normalize_pointer_pressure
  18: CallWindowProcW
  19: EnumChildWindows
  20: IsIconic
  21: KiUserCallbackDispatcher
  22: NtUserDispatchMessage
  23: DispatchMessageW
  24: winit::platform_impl::platform::event_loop::EventLoop<T>::run_return
  25: winit::platform_impl::platform::event_loop::EventLoop<T>::run
  26: bevy_winit::handle_create_window_events
  27: bevy_winit::change_window
  28: bevy_winit::winit_runner_with
  29: core::ops::function::Fn::call
  30: bevy_app::app::App::run
  31: core::ptr::drop_in_place<core::option::Option<bevy_render::mesh::mesh::Indices>>

I reproduced this using the latest commit on main, currently 7ed6296.

@LeonardMH LeonardMH reopened this Apr 21, 2022
@LeonardMH LeonardMH changed the title Use of bevy_ecs_tilemap Use of bevy_ecs_tilemap causes application crash on window minimize (Windows) Apr 21, 2022
@LeonardMH
Copy link
Author

At first I thought this was just a bevy problem in general, but I created a minimal bevy project (the hello_world example) and I was able to minimize the window. I then went back to my project and just removed everything related to bevy_ecs_tilemap and my application no longer crashed on minimize.

@LeonardMH
Copy link
Author

I attempted to git bisect debug to determine when this broke, but going back to the first commit that has a still working version of map.rs (1a91e7c) still crashes, though the backtrace does look different.

@StarArawn StarArawn added the wontfix This will not be worked on label Apr 21, 2022
@StarArawn
Copy link
Owner

This is a bug in Bevy please see:
bevyengine/bevy#4526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants