-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Bevy version
0.16-rc.1
[Optional] Relevant system information
Linux, both wayland and xwayland, intel GPU
AdapterInfo { name: "Intel(R) UHD Graphics 620 (KBL GT2)", vendor: 32902, device: 22807, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 25.0.2-arch1.2", backend: Vulkan }
What you did
I updated to 0.16-rc.1
What went wrong
After updating to 0.16-rc.1
I began to see this crash intermittently. I see it something like 1/4 of the times I run the program, the other times it runs without any panic. It appears to always happen in the frame where I first render 3d meshes. The splash screen and loading screens, which use only 2d and UI elements have never triggered the panic.
I have removed all my custom materials and pipelines and the error still occurs.
Additional information
I see other rendering glitches which may be related but I'm not sure. The other problem is that some, but not all, meshes flicker between being in the correct location and being offset or disappearing entirely when the camera moves. That feels to me like a problem with memory alignment or something in the bindings, which is why I think it might be related to the buffer overrun. But when I look at the frames in renderdoc it doesn't show any errors or warnings which I would expect if it really was related to alignment.
I'm still trimming my code down looking for a minimal example but I'm going to go ahead and post this now in the hopes that the problem is obvious to someone without that.
Logs:
2025-03-25T17:47:43.360364Z ERROR system{name="bevy_render::renderer::render_system"}:submit_graph_commands:main_opaque_pass_3d: wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
0: bevy_core_pipeline::core_3d::main_opaque_pass_3d_node::main_opaque_pass_3d
at /home/user/Code/Vendor/bevy/crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:73
1: bevy_render::renderer::graph_runner::submit_graph_commands
at /home/user/Code/Vendor/bevy/crates/bevy_render/src/renderer/graph_runner.rs:91
2: bevy_ecs::system::function_system::system
with name="bevy_render::renderer::render_system"
at /home/user/Code/Vendor/bevy/crates/bevy_ecs/src/system/function_system.rs:65
thread '<unnamed>' panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-24.0.3/src/backend/wgpu_core.rs:3273:26:
wgpu error: Validation Error
Caused by:
In RenderPass::end
In a draw command, kind: DrawIndirect
Indirect draw uses bytes 160..180 using count 1 which overruns indirect buffer of size 160
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-03-25T17:47:43.360655Z WARN system{name="bevy_render::renderer::render_system"}:submit_graph_commands: bevy_render::diagnostic::internal: Failed to download render statistics buffer: Error occurred when trying to async map a buffer
Encountered a panic in system `bevy_render::renderer::render_system`!
0: bevy_render::pipelined_rendering::render thread
at /home/user/Code/Vendor/bevy/crates/bevy_render/src/pipelined_rendering.rs:151
thread '<unnamed>' panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-hal-24.0.2/src/vulkan/instance.rs:173:58:
Trying to destroy a SurfaceSemaphores that is still in use by a SurfaceTexture
stack backtrace:
0: 0x72ac75f7e6d2 - std::backtrace_rs::backtrace::libunwind::trace::h7b41e8eef9765409
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
1: 0x72ac75f7e6d2 - std::backtrace_rs::backtrace::trace_unsynchronized::hec08791ef9bfb625
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
2: 0x72ac75f7e6d2 - std::sys::backtrace::_print_fmt::h8757b0725484ca15
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/backtrace.rs:66:9
3: 0x72ac75f7e6d2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::he0d531cff38e2925
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/backtrace.rs:39:26
4: 0x72ac75fd08b3 - core::fmt::rt::Argument::fmt::hb4c0b63806a0a89f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/fmt/rt.rs:184:76
5: 0x72ac75fd08b3 - core::fmt::write::h5c649fab4cb548de
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/fmt/mod.rs:1480:21
6: 0x72ac75f72983 - std::io::default_write_fmt::h5a71fd450fab49c6
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/io/mod.rs:639:11
7: 0x72ac75f72983 - std::io::Write::write_fmt::h39e3444d8e36c39b
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/io/mod.rs:1914:13
8: 0x72ac75f7e522 - std::sys::backtrace::BacktraceLock::print::h93a005ddaf18eea5
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/backtrace.rs:42:9
9: 0x72ac75f80bac - std::panicking::default_hook::{{closure}}::ha2942cae439b645f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:300:22
10: 0x72ac75f809af - std::panicking::default_hook::h1a01eff2745405f0
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:327:9
11: 0x72ac74d8b90f - <bevy_log::LogPlugin as bevy_app::plugin::Plugin>::build::{{closure}}::hd6b632cf591c7977
at /home/user/Code/Vendor/bevy/crates/bevy_log/src/lib.rs:269:17
12: 0x72ac75f81713 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h34aba1e1094c0a5f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/boxed.rs:1984:9
13: 0x72ac75f81713 - std::panicking::rust_panic_with_hook::hd69a79ca1d5d11ce
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:841:13
14: 0x72ac75f813ca - std::panicking::begin_panic_handler::{{closure}}::haea084bb8c25d7a8
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:706:13
15: 0x72ac75f7ebd9 - std::sys::backtrace::__rust_end_short_backtrace::hf860e1c313b77355
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/backtrace.rs:168:18
16: 0x72ac75f8105d - __rustc[9702bd01e0b3d9b2]::rust_begin_unwind
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:697:5
17: 0x72ac75fccac0 - core::panicking::panic_fmt::hbf755e4724e0334f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/panicking.rs:75:14
18: 0x72ac75fcc98b - core::panicking::panic_display::hb8a709795ce21c4f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/panicking.rs:261:5
19: 0x72ac75fcc98b - core::option::expect_failed::h37c26159399db1f7
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/option.rs:2024:5
20: 0x72ac749dee91 - core::option::Option<T>::expect::hc712035f0b3c1423
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/option.rs:933:21
21: 0x72ac749dee91 - wgpu_hal::vulkan::instance::<impl wgpu_hal::vulkan::Swapchain>::release_resources::h15f61dec876bfb31
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-hal-24.0.2/src/vulkan/instance.rs:173:31
22: 0x72ac749e4ef4 - wgpu_hal::vulkan::instance::<impl wgpu_hal::Surface for wgpu_hal::vulkan::Surface>::unconfigure::h9167504e7913b7cd
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-hal-24.0.2/src/vulkan/instance.rs:986:38
23: 0x72ac748e500a - <wgpu_core::instance::Surface as core::ops::drop::Drop>::drop::h3dfd10239460d95f
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-core-24.0.2/src/instance.rs:466:30
24: 0x72ac7499c856 - core::ptr::drop_in_place<wgpu_core::instance::Surface>::h8a236642a39ae6e0
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
25: 0x72ac7499c856 - alloc::sync::Arc<T,A>::drop_slow::h7be84ad6c58c1646
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/sync.rs:1943:18
26: 0x72ac74885745 - <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop::hcd82141246908ff3
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/sync.rs:2633:13
27: 0x72ac74885745 - core::ptr::drop_in_place<alloc::sync::Arc<wgpu_core::instance::Surface>>::h7b2ded0d8ea62ce5
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
28: 0x72ac74885745 - wgpu_core::instance::<impl wgpu_core::global::Global>::surface_drop::h0f757d67b4d4ebe0
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-core-24.0.2/src/instance.rs:832:33
29: 0x72ac74834c9f - <wgpu::backend::wgpu_core::CoreSurface as core::ops::drop::Drop>::drop::h6be57ae57f072e4a
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-24.0.3/src/backend/wgpu_core.rs:3486:9
30: 0x72ac74834c9f - core::ptr::drop_in_place<wgpu::backend::wgpu_core::CoreSurface>::h19167a9508322439
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
31: 0x72ac74834c9f - alloc::sync::Arc<T,A>::drop_slow::h042d784292dd615e
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/sync.rs:1943:18
32: 0x72ac73c6feba - <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop::hcf2d95207819e7a0
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/sync.rs:2633:13
33: 0x72ac73c6feba - core::ptr::drop_in_place<alloc::sync::Arc<wgpu::backend::wgpu_core::CoreSurface>>::h67ca0d4eb3b04f61
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
34: 0x72ac73c6feba - core::ptr::drop_in_place<wgpu::dispatch::DispatchSurface>::h22d2018334b42da0
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
35: 0x72ac73c6feba - core::ptr::drop_in_place<wgpu::api::surface::Surface>::h9c21b818b43f8201
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
36: 0x72ac73c724ed - core::ptr::drop_in_place<bevy_render::renderer::WgpuWrapper<wgpu::api::surface::Surface>>::h4b31f1a7179b00af
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
37: 0x72ac73c724ed - core::ptr::drop_in_place<bevy_render::view::window::SurfaceData>::h43621f4f5bd78045
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
38: 0x72ac73a87a22 - core::ptr::drop_in_place<(bevy_ecs::entity::Entity,bevy_render::view::window::SurfaceData)>::h1ca39d52c8911353
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
39: 0x72ac73a87a22 - core::ptr::mut_ptr::<impl *mut T>::drop_in_place::h544740b5bb0b0f26
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mut_ptr.rs:1489:18
40: 0x72ac73a87a22 - hashbrown::raw::Bucket<T>::drop::h125ca4c83d1341c7
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.2/src/raw/mod.rs:468:9
41: 0x72ac73a87a22 - hashbrown::raw::RawTableInner::drop_elements::h31ff6a5c95e08c04
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.2/src/raw/mod.rs:2073:17
42: 0x72ac73c73b56 - hashbrown::raw::RawTableInner::drop_inner_table::hd1e5e915311913a9
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.2/src/raw/mod.rs:2128:17
43: 0x72ac73c73b56 - <hashbrown::raw::RawTable<T,A> as core::ops::drop::Drop>::drop::h90accd4d902e9cdd
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.2/src/raw/mod.rs:3332:13
44: 0x72ac73c73b56 - core::ptr::drop_in_place<hashbrown::raw::RawTable<(bevy_ecs::entity::Entity,bevy_render::view::window::SurfaceData)>>::h8b0a975eb39b6a6c
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
45: 0x72ac73c73b56 - core::ptr::drop_in_place<hashbrown::map::HashMap<bevy_ecs::entity::Entity,bevy_render::view::window::SurfaceData,bevy_ecs::entity::hash::EntityHash>>::hc3d40e8d86db9ea2
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
46: 0x72ac73c73b56 - core::ptr::drop_in_place<bevy_ecs::entity::hash_map::EntityHashMap<bevy_render::view::window::SurfaceData>>::h12fe36e1be85b042
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
47: 0x72ac73c73b56 - core::ptr::drop_in_place<bevy_render::view::window::WindowSurfaces>::h1790ce85780e223f
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
48: 0x72ac7532b051 - bevy_ecs::storage::blob_vec::BlobVec::clear::h3def7ba71e8af612
at /home/user/Code/Vendor/bevy/crates/bevy_ecs/src/storage/blob_vec.rs:390:26
49: 0x72ac7532b051 - <bevy_ecs::storage::blob_vec::BlobVec as core::ops::drop::Drop>::drop::haea01aba6084f6f2
at /home/user/Code/Vendor/bevy/crates/bevy_ecs/src/storage/blob_vec.rs:398:9
50: 0x72ac7532b051 - core::ptr::drop_in_place<bevy_ecs::storage::blob_vec::BlobVec>::ha6462d7b15c39a8b
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
51: 0x72ac7532b051 - core::mem::manually_drop::ManuallyDrop<T>::drop::h35609f20d9534ad9
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/mem/manually_drop.rs:256:18
52: 0x72ac7532b051 - <bevy_ecs::storage::resource::ResourceData<_> as core::ops::drop::Drop>::drop::ha0b37626c05f7eb2
at /home/user/Code/Vendor/bevy/crates/bevy_ecs/src/storage/resource.rs:54:13
53: 0x72ac7532b051 - core::ptr::drop_in_place<bevy_ecs::storage::resource::ResourceData<_>>::h23f9844181efa0e3
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
54: 0x72ac7532caf0 - core::ptr::drop_in_place<[bevy_ecs::storage::resource::ResourceData<_>]>::hea9891cf003a4d68
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
55: 0x72ac7532caf0 - <alloc::vec::Vec<T,A> as core::ops::drop::Drop>::drop::h0dba0d318fd7b624
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/vec/mod.rs:3798:13
56: 0x72ac7532caf0 - core::ptr::drop_in_place<alloc::vec::Vec<bevy_ecs::storage::resource::ResourceData<_>>>::hca5f168a33a4bfd2
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
57: 0x72ac75321f8d - core::ptr::drop_in_place<bevy_ecs::storage::sparse_set::SparseSet<bevy_ecs::component::ComponentId,bevy_ecs::storage::resource::ResourceData<_>>>::h1c6f2ca9b500619d
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
58: 0x72ac753274c7 - core::ptr::drop_in_place<bevy_ecs::storage::resource::Resources<_>>::h0ba986596a7c9689
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
59: 0x72ac753274c7 - core::ptr::drop_in_place<bevy_ecs::storage::Storages>::h2180e167350da79d
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
60: 0x72ac753267b8 - core::ptr::drop_in_place<bevy_ecs::world::World>::h0b0eb2857f3daf78
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
61: 0x72ac75205902 - core::ptr::drop_in_place<bevy_app::sub_app::SubApp>::h9ffc8b38dfafc198
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ptr/mod.rs:523:1
62: 0x72ac73a6da72 - <bevy_render::pipelined_rendering::PipelinedRenderingPlugin as bevy_app::plugin::Plugin>::cleanup::{{closure}}::h7d213e6649b3da4e
at /home/user/Code/Vendor/bevy/crates/bevy_render/src/pipelined_rendering.rs:174:13
63: 0x72ac73a6da72 - std::sys::backtrace::__rust_begin_short_backtrace::hd0643b3034660a94
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/backtrace.rs:152:18
64: 0x72ac73784bfd - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h8f549ba2de369cf7
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/thread/mod.rs:559:17
65: 0x72ac73784bfd - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h56b3fbec79b56979
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/panic/unwind_safe.rs:272:9
66: 0x72ac73784bfd - std::panicking::try::do_call::hc2f0468fec0190cf
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:589:40
67: 0x72ac73784bfd - std::panicking::try::h03c996c21f09a93e
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panicking.rs:552:19
68: 0x72ac73784bfd - std::panic::catch_unwind::hfba75ea333f8955a
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/panic.rs:359:14
69: 0x72ac73784bfd - std::thread::Builder::spawn_unchecked_::{{closure}}::h94dfa7f73e23ffa1
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/thread/mod.rs:557:30
70: 0x72ac73784bfd - core::ops::function::FnOnce::call_once{{vtable.shim}}::h6ad7b8b18488b9e8
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/core/src/ops/function.rs:250:5
71: 0x72ac75f87f7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a8d73d9f4f46e20
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/boxed.rs:1970:9
72: 0x72ac75f87f7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9cda3c8682a8c35b
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/alloc/src/boxed.rs:1970:9
73: 0x72ac75f87f7b - std::sys::pal::unix::thread::Thread::new::thread_start::hb2f35a25c09a29e3
at /rustc/b48576b4db5a595f453891f0b7243ef75d8c0afa/library/std/src/sys/pal/unix/thread.rs:109:17
74: 0x72ac6b7ab70a - <unknown>
75: 0x72ac6b82faac - <unknown>
76: 0x0 - <unknown>
0: bevy_render::pipelined_rendering::render thread
at /home/user/Code/Vendor/bevy/crates/bevy_render/src/pipelined_rendering.rs:151
thread '<unnamed>' panicked at library/core/src/panicking.rs:226:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
'cargo' finished executing.