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

Crash when using Camera2DBundle without HDR + TonyMcMapFace tonemapping #13118

Open
Zarthus opened this issue Apr 27, 2024 · 4 comments · May be fixed by #13262
Open

Crash when using Camera2DBundle without HDR + TonyMcMapFace tonemapping #13118

Zarthus opened this issue Apr 27, 2024 · 4 comments · May be fixed by #13262
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@Zarthus
Copy link

Zarthus commented Apr 27, 2024

Bevy version

0.13.2, main branch (22d605c)

[Optional] Relevant system information

If you cannot get Bevy to build or run on your machine, please include:

  • Latest rust version
  • Windows 11

If your bug is rendering-related, copy the adapter info that appears when you run Bevy.

AdapterInfo { 
  name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8710, 
  device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "551.86", backend: Vulkan 
}

You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:

  • wgpu for rendering problems
  • winit for input and window management
  • gilrs for gamepad inputs

What you did

TL;DR:

  • Spawn a Camera2DBundle
    • Set HDR = false
    • Set tonemapping = Tonemapping::TonyMcMapFace
  • Run Bevy

Minimal code snippet:

use bevy::{
    core_pipeline::tonemapping::Tonemapping,
    prelude::*
};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn((
        Camera2dBundle {
            camera: Camera {
                hdr: false,
                ..default()
            },
            tonemapping: Tonemapping::TonyMcMapface,
            ..default()
        },
    ));
}
[package]
name = "bevy_crash_demo"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = "0.13.2"

## What's maybe interesting is that this seems to be relevant to the feature `bevy_ui`:
## no crash:
# bevy = { version = "0.13.2", default-features = false, features = ["bevy_core_pipeline",  "tonemapping_luts", "bevy_winit"]} 

## crash:
# bevy = { version = "0.13.2", default-features = false, features = ["bevy_core_pipeline",  "tonemapping_luts", "bevy_winit", "bevy_ui"]} # crash

Describe how you arrived at the problem. If you can, consider providing a code snippet or link.

What went wrong

2024-04-27T14:40:26.471379Z ERROR log: Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline    
2024-04-27T14:40:26.471813Z ERROR log: Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
2024-04-27T14:40:26.471844Z ERROR log: Handling wgpu errors as fatal by default
thread 'Async Compute Task Pool (1)' panicked at C:\Users\BuuGh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:3006:5:
wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `sprite_pipeline`
    Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
    Shader global ResourceBinding { group: 0, binding: 18 } is not available in the pipeline layout
    Binding is missing from the pipeline layout

Backtrace: #13118 (comment)

Additional information

Other information that can be used to further reproduce or isolate the problem.
This commonly includes:

  • Things like Reinhard for tonemapping works fine, it seems specific to TonyMcMapFace.
@Zarthus Zarthus added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 27, 2024
@inodentry
Copy link
Contributor

Strange, because you do have the tonemapping_luts feature enabled in both cases. That would have been my first guess as to the culprit for the crash, as you need that cargo feature if you want to use the fancier tonemapping algorithms. But since you have included it in the configuration where you say you get the crash, that's clearly not the problem.

We should investigate. Since you say the bevy_ui feature makes a difference, my initial gut feeling would be to look at how the render graph and camera configuration changes with vs without bevy_ui. Maybe look at setup code in the bevy_ui crate to see what it does to the camera and render graph and if it changes anything relevant.

@inodentry inodentry added A-Rendering Drawing game state to the screen C-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Apr 27, 2024
@inodentry
Copy link
Contributor

Also, since you say your bevy version is 0.13.2, can you please try and see if you can reproduce this issue with the current git main?

@Zarthus
Copy link
Author

Zarthus commented Apr 27, 2024

I checked quickly, also reproduces on the latest main (22d605c):

2024-04-27T18:19:10.318074Z  INFO bevy_winit::system: Creating new window "App" (Entity { index: 0, generation: 1 })
2024-04-27T18:19:10.666123Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8710, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "551.86", backend: Vulkan }
2024-04-27T18:19:11.156111Z ERROR wgpu_core::device::global: Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline    
2024-04-27T18:19:11.156494Z ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'main' panicked at C:\Users\BuuGh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:3006:5:
wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `sprite_pipeline`
    Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
    Shader global ResourceBinding { group: 0, binding: 18 } is not available in the pipeline layout
    Binding is missing from the pipeline layout


note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines`!
2024-04-27T18:19:11.158807Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
2024-04-27T18:19:11.158960Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.

Backtrace

With RUST_BACKTRACE=full
PS D:\Dev\bevy_crash_demo> cargo run
Compiling bevy_crash_demo v0.1.0 (D:\Dev\bevy_crash_demo)
Finished dev [unoptimized + debuginfo] target(s) in 10.12s
Running `target\debug\bevy_crash_demo.exe`
        2024-04-27T18:26:34.309143Z  INFO bevy_winit::system: Creating new window "App" (Entity { index: 0, generation: 1 })
        2024-04-27T18:26:34.702254Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8710, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "551.86", backend: Vulkan }
        2024-04-27T18:26:35.206373Z ERROR wgpu_core::device::global: Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
        2024-04-27T18:26:35.206675Z ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'main' panicked at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:3006:5:
wgpu error: Validation Error

Caused by:
In Device::create_render_pipeline
note: label = `sprite_pipeline`
Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
Shader global ResourceBinding { group: 0, binding: 18 } is not available in the pipeline layout
Binding is missing from the pipeline layout


stack backtrace:
0:     0x7ff74855e602 - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\sys_common\backtrace.rs:44
1:     0x7ff74857930d - core::fmt::rt::Argument::fmt
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\fmt\rt.rs:142
2:     0x7ff74857930d - core::fmt::write
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\fmt\mod.rs:1120
3:     0x7ff74855a871 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\io\mod.rs:1846
4:     0x7ff74855e42a - std::sys_common::backtrace::_print
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\sys_common\backtrace.rs:47
5:     0x7ff74855e42a - std::sys_common::backtrace::print
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\sys_common\backtrace.rs:34
6:     0x7ff7485605d9 - std::panicking::default_hook::closure$1
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:272
7:     0x7ff748560295 - std::panicking::default_hook
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:292
8:     0x7ff748560af4 - std::panicking::rust_panic_with_hook
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:781
9:     0x7ff7485609c9 - std::panicking::begin_panic_handler::closure$0
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:659
10:     0x7ff74855eca9 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\sys_common\backtrace.rs:171
11:     0x7ff748560696 - std::panicking::begin_panic_handler
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:647
12:     0x7ff74858ee07 - core::panicking::panic_fmt
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\core\src\panicking.rs:72
13:     0x7ff7476c2dfc - wgpu::backend::wgpu_core::default_error_handler
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:3006
14:     0x7ff7474c7dad - core::ops::function::Fn::call<void (*)(enum2$<wgpu::Error>),tuple$<enum2$<wgpu::Error> > >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:79
15:     0x7ff747600ff2 - alloc::boxed::impl$49::call<tuple$<enum2$<wgpu::Error> >,dyn$<wgpu::UncapturedErrorHandler<assoc$<Output,tuple$<> > > >,alloc::alloc::Global>
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\alloc\src\boxed.rs:2029
16:     0x7ff7476c2b86 - wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:2992
17:     0x7ff7476a1cc6 - wgpu::backend::wgpu_core::ContextWgpuCore::handle_error<enum2$<wgpu_core::pipeline::CreateRenderPipelineError> >
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:262
18:     0x7ff7476b1ddd - wgpu::backend::wgpu_core::impl$7::device_create_render_pipeline
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\backend\wgpu_core.rs:1152
19:     0x7ff7476c59d2 - wgpu::context::impl$5::device_create_render_pipeline<wgpu::backend::wgpu_core::ContextWgpuCore>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\context.rs:2262
20:     0x7ff74756215b - wgpu::Device::create_render_pipeline
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.4\src\lib.rs:2479
21:     0x7ff746b47527 - bevy_render::renderer::render_device::RenderDevice::create_render_pipeline
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\renderer\render_device.rs:131
22:     0x7ff746bbfa16 - bevy_render::render_resource::pipeline_cache::impl$8::start_create_render_pipeline::async_block$0
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:816
23:     0x7ff746e44a36 - futures_lite::future::block_on::closure$0<enum2$<core::result::Result<enum2$<bevy_render::render_resource::pipeline_cache::Pipeline>,enum2$<bevy_render::render_resource::pipeline_cache::PipelineCacheError> > >,enum2$<bevy_render::render_resource::pipeline
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:99
24:     0x7ff746b7bfe3 - std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::try_with<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<enum2$<core::result::Result<
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:286
25:     0x7ff746b7b84b - std::thread::local::LocalKey<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> > >::with<core::cell::RefCell<tuple$<parking::Parker,core::task::wake::Waker> >,futures_lite::future::block_on::closure_env$0<enum2$<core::result::Result<enum
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\thread\local.rs:262
26:     0x7ff746e4461b - futures_lite::future::block_on<enum2$<core::result::Result<enum2$<bevy_render::render_resource::pipeline_cache::Pipeline>,enum2$<bevy_render::render_resource::pipeline_cache::PipelineCacheError> > >,enum2$<bevy_render::render_resource::pipeline_cache::imp
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\futures-lite-2.3.0\src\future.rs:78
27:     0x7ff746bc2ef7 - bevy_render::render_resource::pipeline_cache::create_pipeline_task<enum2$<bevy_render::render_resource::pipeline_cache::impl$8::start_create_render_pipeline::async_block_env$0> >
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:1010
28:     0x7ff746bbedee - bevy_render::render_resource::pipeline_cache::PipelineCache::start_create_render_pipeline
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:732
29:     0x7ff746bc1e23 - bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:908
30:     0x7ff746bc1a63 - bevy_render::render_resource::pipeline_cache::PipelineCache::process_queue
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:897
31:     0x7ff746928544 - bevy_render::render_resource::pipeline_cache::PipelineCache::block_on_render_pipeline
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_render\src\render_resource\pipeline_cache.rs:618
32:     0x7ff7468e03c2 - bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_core_pipeline\src\upscaling\mod.rs:53
33:     0x7ff74685075f - core::ops::function::FnMut::call_mut<void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_cache::PipelineCache>,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_sp
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:166
34:     0x7ff7468c6037 - core::ops::function::impls::impl$3::call_mut<tuple$<bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_cache::PipelineCache>,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipel
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:294
35:     0x7ff74673ff50 - bevy_ecs::system::function_system::impl$19::run::call_inner<tuple$<>,bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_cache::PipelineCache>,bevy_ecs::change_detection::ResMut<bevy_render::rende
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\system\function_system.rs:665
36:     0x7ff7468c4a16 - bevy_ecs::system::function_system::impl$19::run<tuple$<>,void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_cache::PipelineCache>,bevy_ecs::change_detection::ResMut<bevy_render::render_r
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\system\function_system.rs:668
37:     0x7ff74672defc - bevy_ecs::system::function_system::impl$6::run_unsafe<void (*)(bevy_ecs::system::commands::Commands,bevy_ecs::change_detection::ResMut<bevy_render::render_resource::pipeline_cache::PipelineCache>,bevy_ecs::change_detection::ResMut<bevy_render::render_reso
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\system\function_system.rs:507
38:     0x7ff7482f2da3 - bevy_ecs::schedule::executor::__rust_begin_short_backtrace::run_unsafe
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\schedule\executor\mod.rs:145
39:     0x7ff74837175a - bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure$0
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\schedule\executor\single_threaded.rs:113
40:     0x7ff7482f8d87 - core::ops::function::FnOnce::call_once<bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure_env$0,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
41:     0x7ff7482f71c8 - core::panic::unwind_safe::impl$23::call_once<tuple$<>,bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure_env$0>
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\panic\unwind_safe.rs:272
42:     0x7ff7483227bc - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure_env$0>,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:554
43:     0x7ff7483266b3 - bevy_ecs::query::world_query::impl$0::init_state
44:     0x7ff748322591 - std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure_env$0> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:518
45:     0x7ff74834f3c9 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<bevy_ecs::schedule::executor::single_threaded::impl$0::run::closure_env$0>,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panic.rs:142
46:     0x7ff7483713fa - bevy_ecs::schedule::executor::single_threaded::impl$0::run
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\schedule\executor\single_threaded.rs:104
47:     0x7ff74832b519 - bevy_ecs::schedule::schedule::Schedule::run
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\schedule\schedule.rs:334
48:     0x7ff7482c90c0 - bevy_ecs::world::impl$3::run_schedule::closure$0<bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> > >
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\world\mod.rs:2568
49:     0x7ff7482cad9f - bevy_ecs::world::World::try_schedule_scope<tuple$<>,bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> >,bevy_ecs::world::impl$3::run_schedule::closure_env$0<bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> > >
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\world\mod.rs:2487
50:     0x7ff7482ca928 - bevy_ecs::world::World::schedule_scope<tuple$<>,bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> >,bevy_ecs::world::impl$3::run_schedule::closure_env$0<bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> > > >
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\world\mod.rs:2539
51:     0x7ff7482c9098 - bevy_ecs::world::World::run_schedule<bevy_ecs::intern::Interned<dyn$<bevy_ecs::schedule::set::ScheduleLabel> > >
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_ecs\src\world\mod.rs:2568
52:     0x7ff7482d4e09 - bevy_app::sub_app::SubApp::update
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_app\src\sub_app.rs:138
53:     0x7ff7482d5d4c - bevy_app::sub_app::SubApps::update
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_app\src\sub_app.rs:498
54:     0x7ff7482d91b1 - bevy_app::app::App::update
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_app\src\app.rs:138
55:     0x7ff745b200f3 - bevy_winit::run_app_update_if_should
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_winit\src\lib.rs:782
56:     0x7ff745b1d7e4 - bevy_winit::handle_winit_event
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_winit\src\lib.rs:644
57:     0x7ff745b1c7f0 - bevy_winit::winit_runner::closure$0
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_winit\src\lib.rs:308
58:     0x7ff745ba9c3a - winit::platform_impl::platform::event_loop::impl$3::run_on_demand::closure$0<bevy_window::event::RequestRedraw,bevy_winit::winit_runner::closure_env$0>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:236
59:     0x7ff745b826b8 - alloc::boxed::impl$48::call_mut<tuple$<enum2$<winit::event::Event<bevy_window::event::RequestRedraw> > >,dyn$<core::ops::function::FnMut<tuple$<enum2$<winit::event::Event<bevy_window::event::RequestRedraw> > >,assoc$<Output,tuple$<> > > >,alloc::alloc::Gl
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\alloc\src\boxed.rs:2022
60:     0x7ff745bb863c - winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure$0<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop\runner.rs:250
61:     0x7ff745b206b4 - core::panic::unwind_safe::impl$23::call_once<tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<bevy_window::event::RequestRedraw> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\panic\unwind_safe.rs:272
62:     0x7ff745bfec54 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<bevy_window::event::RequestRedraw> >,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:554
63:     0x7ff745c0d2b3 - bevy_ecs::query::filter::impl$0::update_component_access<bevy_a11y::AccessibilityNode>
64:     0x7ff745bfe77a - std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<bevy_window::event::RequestRedraw> > >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:518
65:     0x7ff745bfe529 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<bevy_window::event::RequestRedraw> >,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panic.rs:142
66:     0x7ff745bb705f - winit::platform_impl::platform::event_loop::runner::EventLoopRunner<bevy_window::event::RequestRedraw>::catch_unwind<bevy_window::event::RequestRedraw,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<b
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop\runner.rs:183
67:     0x7ff745bb853b - winit::platform_impl::platform::event_loop::runner::EventLoopRunner<bevy_window::event::RequestRedraw>::call_event_handler<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop\runner.rs:246
68:     0x7ff745bb6363 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner<bevy_window::event::RequestRedraw>::send_event<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop\runner.rs:224
69:     0x7ff745baa74f - winit::platform_impl::platform::event_loop::WindowData<bevy_window::event::RequestRedraw>::send_event<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:112
70:     0x7ff745bae735 - winit::platform_impl::platform::event_loop::public_window_callback_inner::closure$4<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:1144
71:     0x7ff745b782c7 - core::ops::function::FnOnce::call_once<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_window::event::RequestRedraw>,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
72:     0x7ff745b20731 - core::panic::unwind_safe::impl$23::call_once<tuple$<>,winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_window::event::RequestRedraw> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\panic\unwind_safe.rs:272
73:     0x7ff745bfecc5 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_window::event::RequestRedraw> >,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:554
74:     0x7ff745c0d2b3 - bevy_ecs::query::filter::impl$0::update_component_access<bevy_a11y::AccessibilityNode>
75:     0x7ff745bfea34 - std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_window::event::RequestRedraw> > >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panicking.rs:518
76:     0x7ff745bfe549 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_window::event::RequestRedraw> >,tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\panic.rs:142
77:     0x7ff745bb693f - winit::platform_impl::platform::event_loop::runner::EventLoopRunner<bevy_window::event::RequestRedraw>::catch_unwind<bevy_window::event::RequestRedraw,tuple$<>,winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$4<bevy_wi
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop\runner.rs:183
78:     0x7ff745baccd6 - winit::platform_impl::platform::event_loop::public_window_callback_inner<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:2285
79:     0x7ff745baaabe - winit::platform_impl::platform::event_loop::public_window_callback<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:983
80:     0x7ff8158b8961 - DispatchMessageW
81:     0x7ff8158b81ab - CallWindowProcW
82:     0x7ff745c27858 - windows::Windows::Win32::UI::WindowsAndMessaging::CallWindowProcW<windows::Windows::Win32::Foundation::HWND,windows::Windows::Win32::Foundation::WPARAM,windows::Windows::Win32::Foundation::LPARAM>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-0.48.0\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:149
83:     0x7ff745c1bfe8 - accesskit_windows::subclass::wnd_proc
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\accesskit_windows-0.15.1\src\subclass.rs:58
84:     0x7ff8158b8961 - DispatchMessageW
85:     0x7ff8158b861c - DispatchMessageW
86:     0x7ff8158c3b5d - GetClassLongW
87:     0x7ff815e733a4 - KiUserCallbackDispatcher
88:     0x7ff813251ad4 - NtUserDispatchMessage
89:     0x7ff8158b8504 - DispatchMessageW
90:     0x7ff745ba9e0e - winit::platform_impl::platform::event_loop::EventLoop<bevy_window::event::RequestRedraw>::dispatch_peeked_messages<bevy_window::event::RequestRedraw>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:449
91:     0x7ff745ba9a93 - winit::platform_impl::platform::event_loop::EventLoop<bevy_window::event::RequestRedraw>::run_on_demand<bevy_window::event::RequestRedraw,bevy_winit::winit_runner::closure_env$0>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:247
92:     0x7ff745baa682 - winit::platform_impl::platform::event_loop::EventLoop<bevy_window::event::RequestRedraw>::run<bevy_window::event::RequestRedraw,bevy_winit::winit_runner::closure_env$0>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\platform_impl\windows\event_loop.rs:218
93:     0x7ff745b97137 - winit::event_loop::EventLoop<bevy_window::event::RequestRedraw>::run<bevy_window::event::RequestRedraw,bevy_winit::winit_runner::closure_env$0>
at C:\Users\USERNAME\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winit-0.29.15\src\event_loop.rs:249
94:     0x7ff745b1bcc1 - bevy_winit::winit_runner
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_winit\src\lib.rs:324
95:     0x7ff745b78314 - core::ops::function::FnOnce::call_once<enum2$<bevy_app::app::AppExit> (*)(bevy_app::app::App),tuple$<bevy_app::app::App> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
96:     0x7ff745b77083 - core::ops::function::FnOnce::call_once<enum2$<bevy_app::app::AppExit> (*)(bevy_app::app::App),tuple$<bevy_app::app::App> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
97:     0x7ff7482e354d - alloc::boxed::impl$47::call_once<tuple$<bevy_app::app::App>,dyn$<core::ops::function::FnOnce<tuple$<bevy_app::app::App>,assoc$<Output,enum2$<bevy_app::app::AppExit> > > >,alloc::alloc::Global>
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\alloc\src\boxed.rs:2015
98:     0x7ff7482d92fb - bevy_app::app::App::run
at C:\Users\USERNAME\.cargo\git\checkouts\bevy-f7ffde730c324c74\22d605c\crates\bevy_app\src\app.rs:169
99:     0x7ff745b05c56 - bevy_crash_demo::main
at D:\Dev\bevy_crash_demo\src\main.rs:4
100:     0x7ff745b0655b - core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\ops\function.rs:250
101:     0x7ff745b0100e - core::hint::black_box
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\core\src\hint.rs:334
102:     0x7ff745b0100e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\sys_common\backtrace.rs:155
103:     0x7ff745b04ec1 - std::rt::lang_start::closure$0<tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\rt.rs:166
104:     0x7ff7485557f2 - std::rt::lang_start_internal::closure$2
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\rt.rs:148
105:     0x7ff7485557f2 - std::panicking::try::do_call
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:554
106:     0x7ff7485557f2 - std::panicking::try
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panicking.rs:518
107:     0x7ff7485557f2 - std::panic::catch_unwind
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\panic.rs:142
108:     0x7ff7485557f2 - std::rt::lang_start_internal
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library\std\src\rt.rs:148
109:     0x7ff745b04e9a - std::rt::lang_start<tuple$<> >
at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\std\src\rt.rs:165
110:     0x7ff745b06029 - main
111:     0x7ff74858cfbc - invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
112:     0x7ff74858cfbc - __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
113:     0x7ff8157e257d - BaseThreadInitThunk
114:     0x7ff815e2aa48 - RtlUserThreadStart
Encountered a panic in system `bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines`!
        2024-04-27T18:26:35.933014Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
        2024-04-27T18:26:35.933143Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
        2024-04-27T18:26:35.933249Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
        2024-04-27T18:26:35.933353Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
        2024-04-27T18:26:35.933467Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
        2024-04-27T18:26:35.933614Z  WARN bevy_ecs::world::command_queue: CommandQueue has un-applied commands being dropped.
error: process didn't exit successfully: `target\debug\bevy_crash_demo.exe` (exit code: 101)

@arcashka
Copy link
Contributor

arcashka commented May 4, 2024

I checked main and it fails both with bevy_ui and without it.
Looks like the issue is what bevy doesn't binds tonemapping LUT images for SpritePipeline and Mesh2dPipeline.
Here's how it looks with MeshPipeline https://github.com/bevyengine/bevy/blob/main/crates/bevy_pbr/src/render/mesh_view_bindings.rs#L521

I'm still very much uncertain if this is fully correct, I will investigate it a little more, and hopefully will come up with the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants