wgpu
wgpu copied to clipboard
Crash with ruining examples on debug mode
Description
-
Some example don't work on debug mode.
-
Repro steps and Expected vs observed behavior
hello_triangle
-
cargo run --bin wgpu-examples hello_triangle
- work, but with this error:
[2024-01-18T01:35:31Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
libVkLayer_khronos_validation.so: cannot open shared object file: No such file or directory
[2024-01-18T01:35:31Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x561843787790, name: ?)
[2024-01-18T01:35:31Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
Requested layer "VK_LAYER_KHRONOS_validation" failed to load!
[2024-01-18T01:35:31Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x561843787790, name: ?)
cube
-
cargo run --bin wgpu-examples cube
- don't works:
[2024-01-18T01:50:22Z INFO wgpu_examples::framework] Initializing wgpu...
[2024-01-18T01:50:22Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
libVkLayer_khronos_validation.so: cannot open shared object file: No such file or directory
[2024-01-18T01:50:22Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x55dd58944620, name: ?)
[2024-01-18T01:50:22Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
Requested layer "VK_LAYER_KHRONOS_validation" failed to load!
[2024-01-18T01:50:22Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x55dd58944620, name: ?)
[2024-01-18T01:50:22Z INFO wgpu_core::instance] Adapter Gl AdapterInfo { name: "Mesa Intel(R) HD Graphics 620 (KBL GT2)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
[2024-01-18T01:50:22Z INFO wgpu_examples::framework] Using Mesa Intel(R) HD Graphics 620 (KBL GT2) (Gl)
[2024-01-18T01:50:22Z INFO wgpu_examples::framework] Entering event loop...
[2024-01-18T01:50:22Z INFO wgpu_examples::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2024-01-18T01:50:22Z ERROR wgpu_hal::gles::egl] EGL 'eglMakeCurrent' code 0x3008: eglMakeCurrent
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadDisplay', wgpu-hal/src/gles/egl.rs:305:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2024-01-18T01:50:22Z ERROR wgpu_hal::gles::egl] EGL 'eglMakeCurrent' code 0x3008: eglMakeCurrent
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadDisplay', wgpu-hal/src/gles/egl.rs:305:14
stack backtrace:
0: 0x55dd56e1f5e1 - std::backtrace_rs::backtrace::libunwind::trace::h782cc21a5acaf6cb
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x55dd56e1f5e1 - std::backtrace_rs::backtrace::trace_unsynchronized::hc579eb24ab204515
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55dd56e1f5e1 - std::sys_common::backtrace::_print_fmt::h7223525cfdbacda2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:65:5
3: 0x55dd56e1f5e1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbd7d55b7108d2ab8
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:44:22
4: 0x55dd56e467ef - core::fmt::rt::Argument::fmt::hb4f4a02b9bd9dd49
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/rt.rs:138:9
5: 0x55dd56e467ef - core::fmt::write::h6d54cd7c9e155ec5
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/mod.rs:1094:21
6: 0x55dd56e1c501 - std::io::Write::write_fmt::h6a453a71c692f63b
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/io/mod.rs:1713:15
7: 0x55dd56e1f3f5 - std::sys_common::backtrace::_print::h1cbaa8b42678f928
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:47:5
8: 0x55dd56e1f3f5 - std::sys_common::backtrace::print::h4ddf81241a51b337
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:34:9
9: 0x55dd56e20777 - std::panicking::default_hook::{{closure}}::hff91f1f484ade5cd
10: 0x55dd56e20564 - std::panicking::default_hook::h21f14afd59f7aef9
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:288:9
11: 0x55dd56e20c2c - std::panicking::rust_panic_with_hook::h45f66047b14c555c
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:705:13
12: 0x55dd56e20b27 - std::panicking::begin_panic_handler::{{closure}}::h49d1a88ef0908eb4
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:597:13
13: 0x55dd56e1fa16 - std::sys_common::backtrace::__rust_end_short_backtrace::hccebf9e57f8cc425
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:151:18
14: 0x55dd56e20872 - rust_begin_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
15: 0x55dd557dcc93 - core::panicking::panic_fmt::h54ec9d0e3180a83d
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
16: 0x55dd557dd223 - core::result::unwrap_failed::h1cd730365d65235f
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/result.rs:1651:5
17: 0x55dd56857f97 - core::result::Result<T,E>::unwrap::h892dd4ce50aad42a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/result.rs:1076:23
18: 0x55dd568424bd - wgpu_hal::gles::egl::EglContext::make_current::h8c33ad99f07df6fa
at /home/nathan/RustroverProjects/wgpu/wgpu-hal/src/gles/egl.rs:303:9
19: 0x55dd568adf22 - wgpu_hal::gles::egl::AdapterContext::lock::{{closure}}::haafac09c807e6e86
at /home/nathan/RustroverProjects/wgpu/wgpu-hal/src/gles/egl.rs:417:13
20: 0x55dd5686ae8e - core::option::Option<T>::map::h27a57f27ada26852
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/option.rs:1075:29
21: 0x55dd56842706 - wgpu_hal::gles::egl::AdapterContext::lock::h0bb24901c0903903
at /home/nathan/RustroverProjects/wgpu/wgpu-hal/src/gles/egl.rs:416:19
22: 0x55dd568983e1 - wgpu_hal::gles::device::<impl wgpu_hal::Device<wgpu_hal::gles::Api> for wgpu_hal::gles::Device>::destroy_buffer::h0d7e45c601b9490b
at /home/nathan/RustroverProjects/wgpu/wgpu-hal/src/gles/device.rs:622:23
23: 0x55dd563b081b - <wgpu_core::device::resource::Device<A> as core::ops::drop::Drop>::drop::h358ec44eea9006c3
at /home/nathan/RustroverProjects/wgpu/wgpu-core/src/device/resource.rs:155:13
24: 0x55dd56389877 - core::ptr::drop_in_place<wgpu_core::device::resource::Device<wgpu_hal::gles::Api>>::hee6f88c50eaee25d
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
25: 0x55dd565b9610 - alloc::sync::Arc<T>::drop_slow::h89d0c1836fbb6389
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/sync.rs:1263:18
26: 0x55dd56390462 - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h773bd6a5e82d66c0
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/sync.rs:1899:13
27: 0x55dd563709eb - core::ptr::drop_in_place<alloc::sync::Arc<wgpu_core::device::resource::Device<wgpu_hal::gles::Api>>>::hf07b2a08c770182c
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
28: 0x55dd563734d9 - core::ptr::drop_in_place<wgpu_core::storage::Element<wgpu_core::device::resource::Device<wgpu_hal::gles::Api>>>::hcdd5003c5d5613f4
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
29: 0x55dd56375a80 - core::ptr::drop_in_place<[wgpu_core::storage::Element<wgpu_core::device::resource::Device<wgpu_hal::gles::Api>>]>::ha266352719962379
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
30: 0x55dd56347ae0 - alloc::vec::Vec<T,A>::clear::ha4cc54dc4cd539ad
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/vec/mod.rs:2034:13
31: 0x55dd566d713d - wgpu_core::hub::Hub<A>::clear::hed17bcf78a49572d
at /home/nathan/RustroverProjects/wgpu/wgpu-core/src/hub.rs:267:9
32: 0x55dd5639bed9 - <wgpu_core::global::Global<G> as core::ops::drop::Drop>::drop::hb74cd482695c6335
at /home/nathan/RustroverProjects/wgpu/wgpu-core/src/global.rs:162:13
33: 0x55dd5638ece7 - core::ptr::drop_in_place<wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>>::h1d5d7e0e1ab1d2d9
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
34: 0x55dd563847e4 - core::ptr::drop_in_place<wgpu::backend::wgpu_core::ContextWgpuCore>::h783df5ebd808c8e2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
35: 0x55dd56383cc0 - core::ptr::drop_in_place<dyn wgpu::context::DynContext>::h53b0a824b521eb3f
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
36: 0x55dd565b8e3b - alloc::sync::Arc<T>::drop_slow::h0a30621de18beab0
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/sync.rs:1263:18
37: 0x55dd5638f8cd - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h0e893fedd4fb5107
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/sync.rs:1899:13
38: 0x55dd5638786b - core::ptr::drop_in_place<alloc::sync::Arc<dyn wgpu::context::DynContext>>::h7449e88385dbabee
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
39: 0x55dd559f1c77 - core::ptr::drop_in_place<wgpu::Queue>::h196b30926c77e191
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
40: 0x55dd559f4677 - core::ptr::drop_in_place<wgpu_examples::framework::ExampleContext>::h702beb567f197a08
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
41: 0x55dd559ee5fc - core::ptr::drop_in_place<wgpu_examples::framework::start<wgpu_examples::cube::Example>::{{closure}}::{{closure}}>::h4ba04d3b80add7a8
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ptr/mod.rs:497:1
42: 0x55dd55a21806 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand::h5b9b346564b03a93
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/wayland/event_loop/mod.rs:221:5
43: 0x55dd55a69336 - winit::platform_impl::platform::EventLoop<T>::run_on_demand::hb27419c07bcea172
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:821:56
44: 0x55dd55a6a06a - winit::platform_impl::platform::EventLoop<T>::run::h9967c2fd118bc860
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:814:9
45: 0x55dd55835058 - winit::event_loop::EventLoop<T>::run::h26f943308c1f27fd
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/event_loop.rs:249:9
46: 0x55dd55aaf3a1 - wgpu_examples::framework::start::{{closure}}::hab0ee0c9557841ea
at /home/nathan/RustroverProjects/wgpu/examples/src/framework.rs:390:13
47: 0x55dd55802415 - pollster::block_on::ha37438136cf00bc3
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
48: 0x55dd55abd14f - wgpu_examples::framework::run::hef03011aef97cb67
at /home/nathan/RustroverProjects/wgpu/examples/src/framework.rs:482:13
49: 0x55dd55855343 - wgpu_examples::cube::main::hd14c92c06702caed
at /home/nathan/RustroverProjects/wgpu/examples/src/cube/mod.rs:375:5
50: 0x55dd557de31b - wgpu_examples::main::hb45cb3bd5a92e7f7
at /home/nathan/RustroverProjects/wgpu/examples/src/main.rs:229:5
51: 0x55dd557dddcb - core::ops::function::FnOnce::call_once::h8c95b6df27d0c498
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
52: 0x55dd557dda3e - std::sys_common::backtrace::__rust_begin_short_backtrace::h7d74fd1f5e6983fa
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:135:18
53: 0x55dd557dd841 - std::rt::lang_start::{{closure}}::h7f0ad8ecfc2251ef
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:166:18
54: 0x55dd56e17235 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h802b0fdd426a12ca
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:284:13
55: 0x55dd56e17235 - std::panicking::try::do_call::h2a2f25050efa0cf8
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:500:40
56: 0x55dd56e17235 - std::panicking::try::h9ca7f841c0f0e3dd
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:464:19
57: 0x55dd56e17235 - std::panic::catch_unwind::h92d42a62587f8121
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panic.rs:142:14
58: 0x55dd56e17235 - std::rt::lang_start_internal::{{closure}}::hf1926c7a173d562c
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:148:48
59: 0x55dd56e17235 - std::panicking::try::do_call::haac70d88f0cce898
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:500:40
60: 0x55dd56e17235 - std::panicking::try::h5c20719e1031e74b
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:464:19
61: 0x55dd56e17235 - std::panic::catch_unwind::h9b15b36860d5fe4a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panic.rs:142:14
62: 0x55dd56e17235 - std::rt::lang_start_internal::hf502095b101390bb
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:148:20
63: 0x55dd557dd81a - std::rt::lang_start::ha7d69906945e1fe9
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:165:17
64: 0x55dd557de3de - main
65: 0x7fb72a25414a - __libc_start_call_main
66: 0x7fb72a25420b - __libc_start_main_impl
67: 0x55dd557dd525 - _start
68: 0x0 - <unknown>
thread 'main' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:126:5
stack backtrace:
0: 0x55dd56e1f5e1 - std::backtrace_rs::backtrace::libunwind::trace::h782cc21a5acaf6cb
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x55dd56e1f5e1 - std::backtrace_rs::backtrace::trace_unsynchronized::hc579eb24ab204515
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55dd56e1f5e1 - std::sys_common::backtrace::_print_fmt::h7223525cfdbacda2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:65:5
3: 0x55dd56e1f5e1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbd7d55b7108d2ab8
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:44:22
4: 0x55dd56e467ef - core::fmt::rt::Argument::fmt::hb4f4a02b9bd9dd49
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/rt.rs:138:9
5: 0x55dd56e467ef - core::fmt::write::h6d54cd7c9e155ec5
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/mod.rs:1094:21
6: 0x55dd56e1c501 - std::io::Write::write_fmt::h6a453a71c692f63b
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/io/mod.rs:1713:15
7: 0x55dd56e1f3f5 - std::sys_common::backtrace::_print::h1cbaa8b42678f928
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:47:5
8: 0x55dd56e1f3f5 - std::sys_common::backtrace::print::h4ddf81241a51b337
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:34:9
9: 0x55dd56e20777 - std::panicking::default_hook::{{closure}}::hff91f1f484ade5cd
10: 0x55dd56e20564 - std::panicking::default_hook::h21f14afd59f7aef9
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:288:9
11: 0x55dd56e20c2c - std::panicking::rust_panic_with_hook::h45f66047b14c555c
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:705:13
12: 0x55dd56e20ae1 - std::panicking::begin_panic_handler::{{closure}}::h49d1a88ef0908eb4
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:595:13
13: 0x55dd56e1fa16 - std::sys_common::backtrace::__rust_end_short_backtrace::hccebf9e57f8cc425
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:151:18
14: 0x55dd56e20872 - rust_begin_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
15: 0x55dd557dccd3 - core::panicking::panic_nounwind_fmt::had64f2fa8a941230
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:96:14
16: 0x55dd557dcd77 - core::panicking::panic_nounwind::h1336efe2f0ded733
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:126:5
17: 0x55dd557dcf03 - core::panicking::panic_cannot_unwind::h85e36282315b87dd
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:188:5
18: 0x55dd55a21931 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand::h5b9b346564b03a93
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/wayland/event_loop/mod.rs:192:5
19: 0x55dd55a69336 - winit::platform_impl::platform::EventLoop<T>::run_on_demand::hb27419c07bcea172
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:821:56
20: 0x55dd55a6a06a - winit::platform_impl::platform::EventLoop<T>::run::h9967c2fd118bc860
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:814:9
21: 0x55dd55835058 - winit::event_loop::EventLoop<T>::run::h26f943308c1f27fd
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/event_loop.rs:249:9
22: 0x55dd55aaf3a1 - wgpu_examples::framework::start::{{closure}}::hab0ee0c9557841ea
at /home/nathan/RustroverProjects/wgpu/examples/src/framework.rs:390:13
23: 0x55dd55802415 - pollster::block_on::ha37438136cf00bc3
at /home/nathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
24: 0x55dd55abd14f - wgpu_examples::framework::run::hef03011aef97cb67
at /home/nathan/RustroverProjects/wgpu/examples/src/framework.rs:482:13
25: 0x55dd55855343 - wgpu_examples::cube::main::hd14c92c06702caed
at /home/nathan/RustroverProjects/wgpu/examples/src/cube/mod.rs:375:5
26: 0x55dd557de31b - wgpu_examples::main::hb45cb3bd5a92e7f7
at /home/nathan/RustroverProjects/wgpu/examples/src/main.rs:229:5
27: 0x55dd557dddcb - core::ops::function::FnOnce::call_once::h8c95b6df27d0c498
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
28: 0x55dd557dda3e - std::sys_common::backtrace::__rust_begin_short_backtrace::h7d74fd1f5e6983fa
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:135:18
29: 0x55dd557dd841 - std::rt::lang_start::{{closure}}::h7f0ad8ecfc2251ef
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:166:18
30: 0x55dd56e17235 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h802b0fdd426a12ca
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:284:13
31: 0x55dd56e17235 - std::panicking::try::do_call::h2a2f25050efa0cf8
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:500:40
32: 0x55dd56e17235 - std::panicking::try::h9ca7f841c0f0e3dd
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:464:19
33: 0x55dd56e17235 - std::panic::catch_unwind::h92d42a62587f8121
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panic.rs:142:14
34: 0x55dd56e17235 - std::rt::lang_start_internal::{{closure}}::hf1926c7a173d562c
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:148:48
35: 0x55dd56e17235 - std::panicking::try::do_call::haac70d88f0cce898
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:500:40
36: 0x55dd56e17235 - std::panicking::try::h5c20719e1031e74b
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:464:19
37: 0x55dd56e17235 - std::panic::catch_unwind::h9b15b36860d5fe4a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panic.rs:142:14
38: 0x55dd56e17235 - std::rt::lang_start_internal::hf502095b101390bb
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:148:20
39: 0x55dd557dd81a - std::rt::lang_start::ha7d69906945e1fe9
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/rt.rs:165:17
40: 0x55dd557de3de - main
41: 0x7fb72a25414a - __libc_start_call_main
42: 0x7fb72a25420b - __libc_start_main_impl
43: 0x55dd557dd525 - _start
44: 0x0 - <unknown>
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
Everything works fine in release mode
Platform
OS: Fedora 39 with Wayland GPU: Intel(R) HD Graphics 620 Rust: 1.75.0
What happens here is that wgpu tries to initialize the Vulkan backend but fails because we enable validation layers in dev/debug mode, which are not installed on your system. If you want to fix this, install the vulkan-validation-layers
package on Fedora.
With Vulkan broken, wgpu falls back to OpenGL. OpenGL works in the hello_triangle
example, but interestingly not in the cube
example. I can reproduce this error, but only on Wayland. Setting WAYLAND_DISPLAY=
makes winit fall back to X11 and the example runs.
# wayland, broken
env WGPU_BACKEND="gl" cargo run --bin wgpu-examples cube
# x11, works
env WAYLAND_DISPLAY= WGPU_BACKEND="gl" cargo run --bin wgpu-examples cube
If you only see problems in the cube
example, you could try renaming the cube
binary to wgpu_example
or something to check if it's special handling based on the binary name (at least one driver used to do this apparently)
Good thought, but all the examples got combined into one binary some time ago, and the specific example is now specified by a command line argument. Also happens with other examples, maybe there's a pattern.
Oh, the hello_triangle
example runs with Vulkan even though I specified WGPU_BACKEND="gl"
(verified through mangohud). So, it seems like OpenGL is just straight up broken on Wayland.
Bisected with env WGPU_BACKEND="gl" cargo run --bin (wgpu-examples) cube
. Broken since #4634.
Couple notes:
What happens here is that wgpu tries to initialize the Vulkan backend but fails because we enable validation layers in dev/debug mode, which are not installed on your system.
This is actually even deeper than that. We run without the validation layers fine, but this is the vulkan loader failing to initialize a layer that it thinks should be there and aborting instance creation.
Oh, the hello_triangle example runs with Vulkan even though I specified WGPU_BACKEND="gl" (verified through mangohud). So, it seems like OpenGL is just straight up broken on Wayland.
The hello-triangle example is special in that it doesn't use the standard init functions, so doesn't listen to the WGPU_BACKEND env. Maybe that should change
After i install vulkan-validation-layers
every thing works fine, should i close this issue?
Let's not because OpenGL is completely broken on OpenGL, and that seems glaring to me.