bevyengine / bevyengine/bevy

[MacOs] 0.15 panic: wgpu error: Validation Error

Open
#16,590 2 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug O-iOS O-MacOS S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

Bevy `0.15`

## \[Optional\] Relevant system information

MacOs 15.1.1 (24B91)
Rust 1.83.0 (90b35a623 2024-11-26)

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

```ignore
Adapter AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
```

## What you did

In my project (closed source) once i drop my crate [bevy_debug_log](https://github.com/rustunit/bevy_debug_log) my app crashes on start.

## What went wrong

```ignore
thread '' panicked at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:2976:18:
wgpu error: Validation Error

Caused by:
In RenderPass::end
In a pass parameter
Attachments have differing sample counts: the depth attachment's texture view has count 1 but is followed by the color attachment at index 0's texture view which has count 4

stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
2: wgpu::backend::wgpu_core::default_error_handler
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:3050:5
3: wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:3034:21
4: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_inner
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:299:9
5: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:311:9
6: ::render_pass_end
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:2976:18
7: core::ptr::drop_in_place
at /Users/stephan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:574:1
8: core::ptr::drop_in_place
at /Users/stephan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:574:1
9: core::ptr::drop_in_place
at /Users/stephan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:574:1
10: ::run
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_core_pipeline-0.15.0/src/core_2d/main_transparent_pass_2d_node.rs:81:9
11: as bevy_render::render_graph::node::Node>::run
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/render_graph/node.rs:414:9
12: bevy_render::renderer::graph_runner::RenderGraphRunner::run_graph
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/renderer/graph_runner.rs:225:21
13: bevy_render::renderer::graph_runner::RenderGraphRunner::run_graph
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/renderer/graph_runner.rs:232:21
14: bevy_render::renderer::graph_runner::RenderGraphRunner::run
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/renderer/graph_runner.rs:80:9
15: bevy_render::renderer::render_system
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/renderer/mod.rs:40:15
16: core::ops::function::FnMut::call_mut
at /Users/stephan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:166:5
17: core::ops::function::impls:: for &mut F>::call_mut
at /Users/stephan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:294:13
18: Out>>::run::call_inner
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.0/src/system/exclusive_function_system.rs:245:21
19: Out>>::run
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.0/src/system/exclusive_function_system.rs:248:17
20: as bevy_ecs::system::system::System>::run::{{closure}}
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.0/src/system/exclusive_function_system.rs:129:23
21: bevy_ecs::world::World::last_change_tick_scope
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.0/src/world/mod.rs:3187:9
22: as bevy_ecs::system::system::System>::run
at /Users/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.0/src/system/exclusive_function_system.rs:121:9
```

## Additional information

maybe related to #16588 though different panic location. and i am not doing any custom shader, material or vertexbuffer shenigans.

my bevy features:

```
bevy = { version = "0.15", default-features = false, features = [
"bevy_audio",
"bevy_gizmos",
"bevy_text",
"bevy_winit",
"bevy_window",
"bevy_ui",
"multi_threaded",
"vorbis",
"webgl2",
"x11",
] }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.