Closed krakow10 closed 1 year ago
This happens on windows too, it's something related to the winit update.
I just looked into your examples, and you don't even ask for redraw to have a loop for rendering. The only place where you do so was in hello-triangle
from Resized
.
Winit is now using Wait
by default, so you either set it back to Poll
or wakeup yourself, which you can do with Window::request_redraw
, but you need to do it after or including RedrawRequested
.
diff --git a/examples/common/src/framework.rs b/examples/common/src/framework.rs
index bced1eaa8..9a9287dd6 100644
--- a/examples/common/src/framework.rs
+++ b/examples/common/src/framework.rs
@@ -72,7 +72,7 @@ pub trait Example: 'static + Sized {
}
struct Setup {
- _window: Window,
+ window: Window,
event_loop: EventLoop<()>,
instance: wgpu::Instance,
size: winit::dpi::PhysicalSize<u32>,
@@ -244,7 +244,7 @@ async fn setup<E: Example>(title: &str) -> Setup {
.expect("Unable to find a suitable GPU adapter!");
Setup {
- _window: window,
+ window,
event_loop,
instance,
size,
@@ -259,6 +259,7 @@ async fn setup<E: Example>(title: &str) -> Setup {
fn start<E: Example>(
#[cfg(not(target_arch = "wasm32"))] Setup {
+ window,
event_loop,
instance,
size,
@@ -269,6 +270,7 @@ fn start<E: Example>(
..
}: Setup,
#[cfg(target_arch = "wasm32")] Setup {
+ window,
event_loop,
instance,
size,
@@ -375,8 +377,12 @@ fn start<E: Example>(
example.render(&view, &device, &queue);
+ window.pre_present_notify();
+
frame.present();
+ window.request_redraw();
+
#[cfg(target_arch = "wasm32")]
{
if let Some(offscreen_canvas_setup) = &offscreen_canvas_setup {
This will probably do it?
You can remove pre_present_notify
if you use vsync, this lets winit to schedule Redraws on frame callbacks on wayland for example. But you generally don't need it if you want to render as fast as possible.
I checked water
example on trunk
(4bc1bf0
) and it's only first frame on m2 mac and on Windows 11 I got new frames only when resize window.
with the patch I posted applied?
macOS could be broken, but you can try asking for redraw in AboutToWait
in framework
.
@kchibisov with path water
work fine. But on my personal project which I recently updated from 0.17 to trunk
I got pink screen on m2 mac while the same updated version on windows 11 works fine. Do I to need create separate issue for that?
@kchibisov nice, Thanks! I figured it was an issue with how we migrated, just hadn't gotten a chance to look at it yet.
@swiftcoder macOS could still be broken, since we have some issue in alacritty due to drawing from within RedrawRequested
(AboutToWait
works), but I'll probably get to it in soon.
Same here (Arch Linux with 545 drivers and Wayland).
Unfocusing and refocusing the window will cause a new frame to be drawn. Otherwise, nothing.
@kaimast with the patch applied?
Sorry, I thought the patch was in trunk already. I have a PRIME setup with Intel UHD graphics and a GTX 1650 TI.
Using low power preference everything works fine with the patch applied. When selecting the Nvidia GPU it will draw one frame and then become unresponsive (seems like a different bug).
Our event loop handling is a bit of a complete mess. I'm working to refactor it to be a bit more sane, though it will probably take me a day or two, as there are a bunch of competing requirements.
With this change I get the following error now
Finished dev [unoptimized + debuginfo] target(s) in 0.23s
Running `target/debug/skybox`
[2023-11-06T02:59:50Z DEBUG sctk] Bound new global [4] wl_output v4
[2023-11-06T02:59:50Z DEBUG sctk] Bound new global [5] zxdg_output_manager_v1 v3
[2023-11-06T02:59:50Z DEBUG sctk] Bound new global [15] wl_seat v7
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Argb8888
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xrgb8888
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Abgr8888
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xbgr8888
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Rgb565
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Argb2101010
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xrgb2101010
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Abgr2101010
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xbgr2101010
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Argb16161616f
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xrgb16161616f
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Abgr16161616f
[2023-11-06T02:59:50Z DEBUG sctk] supported wl_shm format Xbgr16161616f
[2023-11-06T02:59:50Z TRACE calloop::loop_logic] [calloop] Inserting new source #0
[2023-11-06T02:59:50Z TRACE calloop::loop_logic] [calloop] Inserting new source #1
[2023-11-06T02:59:50Z TRACE calloop::loop_logic] [calloop] Inserting new source #2
[2023-11-06T02:59:50Z DEBUG sctk_adwaita::buttons] Ignoring "appmenu" button
[2023-11-06T02:59:50Z INFO wgpu_example::framework] Initializing wgpu...
[2023-11-06T02:59:50Z INFO wgpu_example::framework] Using Mesa Intel(R) UHD Graphics (CML GT2) (Gl)
[2023-11-06T02:59:50Z INFO wgpu_example::framework] Entering event loop...
[2023-11-06T02:59:50Z INFO wgpu_example::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2023-11-06T02:59:50Z 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
[2023-11-06T02:59:50Z 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: 0x55ebd2cc32ca - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x55ebd2cc32ca - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55ebd2cc32ca - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
3: 0x55ebd2cc32ca - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
4: 0x55ebd2ce8c9f - core::fmt::write::h9ffde816c577717b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
5: 0x55ebd2cc0165 - std::io::Write::write_fmt::h88186074961638e4
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
6: 0x55ebd2cc3095 - std::sys_common::backtrace::_print::h184198273ed08d59
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
7: 0x55ebd2cc3095 - std::sys_common::backtrace::print::h1b4d8e7add699453
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
8: 0x55ebd2cc461e - std::panicking::default_hook::{{closure}}::h393bcea75423915a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
9: 0x55ebd2cc43c5 - std::panicking::default_hook::h48c64f31d8b3fd03
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
10: 0x55ebd2cc4b7e - std::panicking::rust_panic_with_hook::hafdc493a79370062
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
11: 0x55ebd2cc4a79 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:582:13
12: 0x55ebd2cc3736 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
13: 0x55ebd2cc47d2 - rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
14: 0x55ebd1b87dd3 - core::panicking::panic_fmt::h0f6ef0178afce4f2
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
15: 0x55ebd1b88373 - core::result::unwrap_failed::h8090202169109f9c
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1687:5
16: 0x55ebd29ab1c7 - core::result::Result<T,E>::unwrap::h8566db6167567a99
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1089:23
17: 0x55ebd2904c1d - wgpu_hal::gles::egl::EglContext::make_current::hd090092ec5406cbc
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:303:9
18: 0x55ebd294ca22 - wgpu_hal::gles::egl::AdapterContext::lock::{{closure}}::hb6593d071ed381be
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:417:13
19: 0x55ebd298c59e - core::option::Option<T>::map::h4ec7729ee0787fc1
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/option.rs:1099:29
20: 0x55ebd2904e76 - wgpu_hal::gles::egl::AdapterContext::lock::hc9363fdff58422f4
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:416:19
21: 0x55ebd289824e - wgpu_hal::gles::device::<impl wgpu_hal::Device<wgpu_hal::gles::Api> for wgpu_hal::gles::Device>::destroy_buffer::hc844ab84e29bddfa
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/device.rs:603:23
22: 0x55ebd258488e - wgpu_core::device::resource::Device<A>::dispose::h4ad8be5fd5b31cfb
at /home/kai/dev/research/wgpu/wgpu-core/src/device/resource.rs:3367:13
23: 0x55ebd2465d42 - wgpu_core::hub::Hub<A,F>::clear::hbd01a83b933a160f
at /home/kai/dev/research/wgpu/wgpu-core/src/hub.rs:644:17
24: 0x55ebd264e3de - <wgpu_core::global::Global<G> as core::ops::drop::Drop>::drop::h97048d3e70bdc4dc
at /home/kai/dev/research/wgpu/wgpu-core/src/global.rs:146:13
25: 0x55ebd2649ee7 - core::ptr::drop_in_place<wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>>::h7c201fb77ef08c7c
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
26: 0x55ebd263f8e4 - core::ptr::drop_in_place<wgpu::backend::direct::Context>::h7b86d4515cf9c5ee
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
27: 0x55ebd263ff60 - core::ptr::drop_in_place<dyn wgpu::context::DynContext>::hfc49374773ce69aa
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
28: 0x55ebd25f165b - alloc::sync::Arc<T>::drop_slow::hd56c94fe5baa65d8
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/sync.rs:1259:18
29: 0x55ebd264a82d - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h64f15d10133b22b0
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/sync.rs:1886:13
30: 0x55ebd264402b - core::ptr::drop_in_place<alloc::sync::Arc<dyn wgpu::context::DynContext>>::hc0d4786875b70d57
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
31: 0x55ebd21099c7 - core::ptr::drop_in_place<wgpu::Queue>::hbe6e62351c00be83
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
32: 0x55ebd1bc7207 - core::ptr::drop_in_place<wgpu_example::framework::ExampleContext>::h61303bd6baf86d23
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
33: 0x55ebd1bc6419 - core::ptr::drop_in_place<wgpu_example::framework::start<skybox::Example>::{{closure}}::{{closure}}>::h12171fe36c1ead2e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
34: 0x55ebd1bb816d - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand::h7232a5c4e4ff3819
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/wayland/event_loop/mod.rs:221:5
35: 0x55ebd1bc4b2d - winit::platform_impl::platform::EventLoop<T>::run_on_demand::h04463f855d8c94e4
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:821:56
36: 0x55ebd1bc4b76 - winit::platform_impl::platform::EventLoop<T>::run::hc65bb62041fabc08
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:814:9
37: 0x55ebd1ba62f7 - winit::event_loop::EventLoop<T>::run::h7d0d9e11e499085a
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/event_loop.rs:249:9
38: 0x55ebd1bacec7 - wgpu_example::framework::start::{{closure}}::h6bf0544a168b8959
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:377:13
39: 0x55ebd1bc2fc9 - pollster::block_on::h5e49419bbd76efaf
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
40: 0x55ebd1bac8a1 - wgpu_example::framework::run::h7938d75597ac6f52
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:464:13
41: 0x55ebd1bd0c12 - skybox::main::h7e1500f8fe653473
at /home/kai/dev/research/wgpu/examples/skybox/src/main.rs:460:5
42: 0x55ebd1bc5c2b - core::ops::function::FnOnce::call_once::hc8c99d08aa2fb26b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
43: 0x55ebd1ba315e - std::sys_common::backtrace::__rust_begin_short_backtrace::h82d515ee1c5be847
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:134:18
44: 0x55ebd1be1071 - std::rt::lang_start::{{closure}}::h6e5043fafccbfacf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:166:18
45: 0x55ebd2cbb51e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
46: 0x55ebd2cbb51e - std::panicking::try::do_call::h4044173225fe83dd
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
47: 0x55ebd2cbb51e - std::panicking::try::hd8a722c09d156a53
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
48: 0x55ebd2cbb51e - std::panic::catch_unwind::hd2ca07971cf0119b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
49: 0x55ebd2cbb51e - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
50: 0x55ebd2cbb51e - std::panicking::try::do_call::hf47aa1aa005e5f1a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
51: 0x55ebd2cbb51e - std::panicking::try::h73d246b2423eaf4e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
52: 0x55ebd2cbb51e - std::panic::catch_unwind::hbaaeae8f1b2f9915
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
53: 0x55ebd2cbb51e - std::rt::lang_start_internal::h76f3e81e6b8f13f9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
54: 0x55ebd1be104a - std::rt::lang_start::h2774abbc08654444
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:165:17
55: 0x55ebd1bd0c3e - main
56: 0x7f9d41333cd0 - <unknown>
57: 0x7f9d41333d8a - __libc_start_main
58: 0x55ebd1b89005 - _start
59: 0x0 - <unknown>
thread panicked while panicking. aborting.
Man, why is this so hard to get right?
Could you rerun with RUST_BACKTRACE=1
Some more context. The crash for me only happens when running with WGPU_POWER_PREF=low
and with the commit (8547226176123bc1d37b1dbc777061a4c2134129) applied.
With WGPU_POWER_PREF=high
the application will just freeze immediately.
Here is the full output:
~> RUST_BACKTRACE=full RUST_LOG=trace WGPU_POWER_PREF=low cargo run --bin=skybox
Finished dev [unoptimized + debuginfo] target(s) in 0.16s
Running `target/debug/skybox`
[2023-11-12T22:01:27Z DEBUG sctk] Bound new global [4] wl_output v4
[2023-11-12T22:01:27Z DEBUG sctk] Bound new global [5] zxdg_output_manager_v1 v3
[2023-11-12T22:01:27Z DEBUG sctk] Bound new global [15] wl_seat v7
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Argb8888
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xrgb8888
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Abgr8888
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xbgr8888
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Rgb565
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Argb2101010
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xrgb2101010
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Abgr2101010
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xbgr2101010
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Argb16161616f
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xrgb16161616f
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Abgr16161616f
[2023-11-12T22:01:27Z DEBUG sctk] supported wl_shm format Xbgr16161616f
[2023-11-12T22:01:27Z TRACE calloop::loop_logic] [calloop] Inserting new source #0
[2023-11-12T22:01:27Z TRACE calloop::loop_logic] [calloop] Inserting new source #1
[2023-11-12T22:01:27Z TRACE calloop::loop_logic] [calloop] Inserting new source #2
[2023-11-12T22:01:27Z DEBUG sctk_adwaita::buttons] Ignoring "appmenu" button
[2023-11-12T22:01:27Z INFO wgpu_example::framework] Initializing wgpu...
[2023-11-12T22:01:27Z INFO wgpu_example::framework] Using Mesa Intel(R) UHD Graphics (CML GT2) (Gl)
[2023-11-12T22:01:27Z INFO wgpu_example::framework] Entering event loop...
[2023-11-12T22:01:27Z INFO wgpu_example::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2023-11-12T22:01:27Z 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: 0x562f18a5627a - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x562f18a5627a - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x562f18a5627a - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
3: 0x562f18a5627a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
4: 0x562f18a7bc4f - core::fmt::write::h9ffde816c577717b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
5: 0x562f18a53115 - std::io::Write::write_fmt::h88186074961638e4
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
6: 0x562f18a56045 - std::sys_common::backtrace::_print::h184198273ed08d59
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
7: 0x562f18a56045 - std::sys_common::backtrace::print::h1b4d8e7add699453
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
8: 0x562f18a575ce - std::panicking::default_hook::{{closure}}::h393bcea75423915a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
9: 0x562f18a57375 - std::panicking::default_hook::h48c64f31d8b3fd03
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
10: 0x562f18a57b2e - std::panicking::rust_panic_with_hook::hafdc493a79370062
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
11: 0x562f18a57a29 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:582:13
12: 0x562f18a566e6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
13: 0x562f18a57782 - rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
14: 0x562f17909dd3 - core::panicking::panic_fmt::h0f6ef0178afce4f2
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
15: 0x562f1790a373 - core::result::unwrap_failed::h8090202169109f9c
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1687:5
16: 0x562f18604607 - core::result::Result<T,E>::unwrap::h654ee9572511c65f
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1089:23
17: 0x562f18680d5d - wgpu_hal::gles::egl::EglContext::make_current::h8853fcc4b79ccf02
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:303:9
18: 0x562f18702a12 - wgpu_hal::gles::egl::AdapterContext::lock::{{closure}}::h72305dbc4f16b9a9
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:417:13
19: 0x562f186e4cee - core::option::Option<T>::map::h0a6cd3e880b38c47
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/option.rs:1099:29
20: 0x562f18680fb6 - wgpu_hal::gles::egl::AdapterContext::lock::hc04a7af7a3079716
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:416:19
21: 0x562f18687e5d - wgpu_hal::gles::egl::Surface::unconfigure_impl::h431a3143f2eea786
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:1113:19
22: 0x562f1868808c - <wgpu_hal::gles::egl::Surface as wgpu_hal::Surface<wgpu_hal::gles::Api>>::configure::hc1bf2889db29f156
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:1140:51
23: 0x562f1847c126 - wgpu_core::device::global::<impl wgpu_core::global::Global<G>>::surface_configure::h45be8e682e294025
at /home/kai/dev/research/wgpu/wgpu-core/src/device/global.rs:2448:21
24: 0x562f1842814f - <wgpu::backend::direct::Context as wgpu::context::Context>::surface_configure::ha06b5c58de7d8c67
at /home/kai/dev/research/wgpu/wgpu/src/backend/direct.rs:778:21
25: 0x562f1826e824 - <T as wgpu::context::DynContext>::surface_configure::h7baaac80d5290e15
at /home/kai/dev/research/wgpu/wgpu/src/context.rs:2229:9
26: 0x562f181d8074 - wgpu::Surface::configure::h8cd91cd3e5bac935
at /home/kai/dev/research/wgpu/wgpu/src/lib.rs:4959:9
27: 0x562f1798161a - wgpu_example::framework::SurfaceWrapper::resume::h7c7dff40cd80196e
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:198:9
28: 0x562f179307c4 - wgpu_example::framework::start::{{closure}}::{{closure}}::he10f33f929b55fe7
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:387:21
29: 0x562f179313af - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h096023cadd351db2
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:298:13
30: 0x562f179359e9 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::single_iteration::h1b6dcab319ad35b3
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/wayland/event_loop/mod.rs:340:9
31: 0x562f179351f9 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events::h308bc42d26bfc4b3
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/wayland/event_loop/mod.rs:231:13
32: 0x562f179356d5 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand::h6110182551c6ed24
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/wayland/event_loop/mod.rs:201:19
33: 0x562f1796474d - winit::platform_impl::platform::EventLoop<T>::run_on_demand::h5b78bfc7197f6ffd
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:821:56
34: 0x562f17964796 - winit::platform_impl::platform::EventLoop<T>::run::h7dc25f9ac5a41db6
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:814:9
35: 0x562f179286b7 - winit::event_loop::EventLoop<T>::run::hb100053e2330a5a1
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/event_loop.rs:249:9
36: 0x562f179304c7 - wgpu_example::framework::start::{{closure}}::h8b9f66f35ebaaf6e
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:379:13
37: 0x562f17944fe9 - pollster::block_on::hc5811da48935329b
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
38: 0x562f1792fea1 - wgpu_example::framework::run::h965a29a727ad9b1e
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:466:13
39: 0x562f1794a662 - skybox::main::ha879597d17030860
at /home/kai/dev/research/wgpu/examples/skybox/src/main.rs:460:5
40: 0x562f1796124b - core::ops::function::FnOnce::call_once::ha84f1eaf561742a9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
41: 0x562f179595be - std::sys_common::backtrace::__rust_begin_short_backtrace::h193d77ffb0f2cb79
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:134:18
42: 0x562f1794dfa1 - std::rt::lang_start::{{closure}}::hfce47828a31c08df
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:166:18
43: 0x562f18a4e4ce - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
44: 0x562f18a4e4ce - std::panicking::try::do_call::h4044173225fe83dd
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
45: 0x562f18a4e4ce - std::panicking::try::hd8a722c09d156a53
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
46: 0x562f18a4e4ce - std::panic::catch_unwind::hd2ca07971cf0119b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
47: 0x562f18a4e4ce - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
48: 0x562f18a4e4ce - std::panicking::try::do_call::hf47aa1aa005e5f1a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
49: 0x562f18a4e4ce - std::panicking::try::h73d246b2423eaf4e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
50: 0x562f18a4e4ce - std::panic::catch_unwind::hbaaeae8f1b2f9915
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
51: 0x562f18a4e4ce - std::rt::lang_start_internal::h76f3e81e6b8f13f9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
52: 0x562f1794df7a - std::rt::lang_start::h11f2b85d3991fc00
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:165:17
53: 0x562f1794a68e - main
54: 0x7fe797158cd0 - <unknown>
55: 0x7fe797158d8a - __libc_start_main
56: 0x562f1790b005 - _start
57: 0x0 - <unknown>
[2023-11-12T22:01:27Z 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: 0x562f18a5627a - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x562f18a5627a - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x562f18a5627a - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
3: 0x562f18a5627a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
4: 0x562f18a7bc4f - core::fmt::write::h9ffde816c577717b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
5: 0x562f18a53115 - std::io::Write::write_fmt::h88186074961638e4
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
6: 0x562f18a56045 - std::sys_common::backtrace::_print::h184198273ed08d59
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
7: 0x562f18a56045 - std::sys_common::backtrace::print::h1b4d8e7add699453
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
8: 0x562f18a575ce - std::panicking::default_hook::{{closure}}::h393bcea75423915a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
9: 0x562f18a57375 - std::panicking::default_hook::h48c64f31d8b3fd03
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
10: 0x562f18a57b2e - std::panicking::rust_panic_with_hook::hafdc493a79370062
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
11: 0x562f18a57a29 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:582:13
12: 0x562f18a566e6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
13: 0x562f18a57782 - rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
14: 0x562f17909dd3 - core::panicking::panic_fmt::h0f6ef0178afce4f2
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
15: 0x562f1790a373 - core::result::unwrap_failed::h8090202169109f9c
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1687:5
16: 0x562f18604607 - core::result::Result<T,E>::unwrap::h654ee9572511c65f
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1089:23
17: 0x562f18680d5d - wgpu_hal::gles::egl::EglContext::make_current::h8853fcc4b79ccf02
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:303:9
18: 0x562f18702a12 - wgpu_hal::gles::egl::AdapterContext::lock::{{closure}}::h72305dbc4f16b9a9
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:417:13
19: 0x562f186e4cee - core::option::Option<T>::map::h0a6cd3e880b38c47
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/option.rs:1099:29
20: 0x562f18680fb6 - wgpu_hal::gles::egl::AdapterContext::lock::hc04a7af7a3079716
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/egl.rs:416:19
21: 0x562f186d1ade - wgpu_hal::gles::device::<impl wgpu_hal::Device<wgpu_hal::gles::Api> for wgpu_hal::gles::Device>::destroy_buffer::h81942594d43b68cd
at /home/kai/dev/research/wgpu/wgpu-hal/src/gles/device.rs:610:23
22: 0x562f183f2a1c - wgpu_core::device::resource::Device<A>::dispose::he4c059c7d3e08a7e
at /home/kai/dev/research/wgpu/wgpu-core/src/device/resource.rs:3389:13
23: 0x562f1844bdc2 - wgpu_core::hub::Hub<A,F>::clear::h9169dcb627e11bcd
at /home/kai/dev/research/wgpu/wgpu-core/src/hub.rs:644:17
24: 0x562f182a172e - <wgpu_core::global::Global<G> as core::ops::drop::Drop>::drop::he569ddf913fa107e
at /home/kai/dev/research/wgpu/wgpu-core/src/global.rs:146:13
25: 0x562f1829d237 - core::ptr::drop_in_place<wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>>::h23bfd8a2f6b71c9e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
26: 0x562f18292b44 - core::ptr::drop_in_place<wgpu::backend::direct::Context>::hb31636864b62677f
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
27: 0x562f182931f0 - core::ptr::drop_in_place<dyn wgpu::context::DynContext>::hee1d0c06c569ee85
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
28: 0x562f1827ba5b - alloc::sync::Arc<T>::drop_slow::hea8229d84a4c9e13
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/sync.rs:1259:18
29: 0x562f1829dccd - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h938e2149753553ad
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/sync.rs:1886:13
30: 0x562f182972bb - core::ptr::drop_in_place<alloc::sync::Arc<dyn wgpu::context::DynContext>>::hfcf614507f40b21b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
31: 0x562f17e8d067 - core::ptr::drop_in_place<wgpu::Queue>::ha3092ff07178facf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
32: 0x562f17962877 - core::ptr::drop_in_place<wgpu_example::framework::ExampleContext>::hc9a909bb6a60edf3
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
33: 0x562f17961a89 - core::ptr::drop_in_place<wgpu_example::framework::start<skybox::Example>::{{closure}}::{{closure}}>::h7ae18292802e127e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ptr/mod.rs:490:1
34: 0x562f1793571d - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand::h6110182551c6ed24
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/wayland/event_loop/mod.rs:221:5
35: 0x562f1796474d - winit::platform_impl::platform::EventLoop<T>::run_on_demand::h5b78bfc7197f6ffd
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:821:56
36: 0x562f17964796 - winit::platform_impl::platform::EventLoop<T>::run::h7dc25f9ac5a41db6
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/platform_impl/linux/mod.rs:814:9
37: 0x562f179286b7 - winit::event_loop::EventLoop<T>::run::hb100053e2330a5a1
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.3/src/event_loop.rs:249:9
38: 0x562f179304c7 - wgpu_example::framework::start::{{closure}}::h8b9f66f35ebaaf6e
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:379:13
39: 0x562f17944fe9 - pollster::block_on::hc5811da48935329b
at /home/kai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.3.0/src/lib.rs:128:15
40: 0x562f1792fea1 - wgpu_example::framework::run::h965a29a727ad9b1e
at /home/kai/dev/research/wgpu/examples/common/src/framework.rs:466:13
41: 0x562f1794a662 - skybox::main::ha879597d17030860
at /home/kai/dev/research/wgpu/examples/skybox/src/main.rs:460:5
42: 0x562f1796124b - core::ops::function::FnOnce::call_once::ha84f1eaf561742a9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
43: 0x562f179595be - std::sys_common::backtrace::__rust_begin_short_backtrace::h193d77ffb0f2cb79
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:134:18
44: 0x562f1794dfa1 - std::rt::lang_start::{{closure}}::hfce47828a31c08df
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:166:18
45: 0x562f18a4e4ce - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
46: 0x562f18a4e4ce - std::panicking::try::do_call::h4044173225fe83dd
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
47: 0x562f18a4e4ce - std::panicking::try::hd8a722c09d156a53
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
48: 0x562f18a4e4ce - std::panic::catch_unwind::hd2ca07971cf0119b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
49: 0x562f18a4e4ce - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
50: 0x562f18a4e4ce - std::panicking::try::do_call::hf47aa1aa005e5f1a
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
51: 0x562f18a4e4ce - std::panicking::try::h73d246b2423eaf4e
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
52: 0x562f18a4e4ce - std::panic::catch_unwind::hbaaeae8f1b2f9915
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
53: 0x562f18a4e4ce - std::rt::lang_start_internal::h76f3e81e6b8f13f9
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
54: 0x562f1794df7a - std::rt::lang_start::h11f2b85d3991fc00
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:165:17
55: 0x562f1794a68e - main
56: 0x7fe797158cd0 - <unknown>
57: 0x7fe797158d8a - __libc_start_main
58: 0x562f1790b005 - _start
59: 0x0 - <unknown>
thread panicked while panicking. aborting.
Description request_redraw might not be working, the example only renders one frame. This also affects my application which is based on the skybox example. This is probably an Nvidia driver bug because this driver version reworks many Wayland things.
Repro steps
cargo run --bin skybox
Expected vs observed behavior Many frames should be rendered per second, but only one is observed once.
Extra materials None
Platform OS: Archlinux x86-64 Nvidia Driver: 545.29.02 GPU: 3080 Ti DE: Hyprland