Ribir
Ribir copied to clipboard
wgpu_backend: Crash with timeout on `surface.get_current_texture()`
Problem Any example fails after initial rendering with the following backtrace:
[nix-shell:~/ribir/ribir/examples/storybook]$ RUST_BACKTRACE=1 cargo +nightly run
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running `/home/kayo/devel/rust/ribir/ribir/target/debug/storybook`
thread 'main' panicked at ribir/src/backends/wgpu_backend.rs:44:58:
called `Result::unwrap()` on an `Err` value: Timeout
stack backtrace:
0: rust_begin_unwind
at /rustc/fcab24817c72ffbd6ffb66d92b7ddc0d3ee4d2f0/library/std/src/panicking.rs:597:5
1: core::panicking::panic_fmt
at /rustc/fcab24817c72ffbd6ffb66d92b7ddc0d3ee4d2f0/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/fcab24817c72ffbd6ffb66d92b7ddc0d3ee4d2f0/library/core/src/result.rs:1653:5
3: core::result::Result<T,E>::unwrap
at /rustc/fcab24817c72ffbd6ffb66d92b7ddc0d3ee4d2f0/library/core/src/result.rs:1077:23
4: <ribir::backends::wgpu_backend::WgpuBackend as ribir::winit_shell_wnd::WinitBackend>::begin_frame
at /home/kayo/devel/rust/ribir/ribir/ribir/src/backends/wgpu_backend.rs:44:23
5: <ribir::winit_shell_wnd::WinitShellWnd as ribir_core::window::ShellWindow>::begin_frame
at /home/kayo/devel/rust/ribir/ribir/ribir/src/winit_shell_wnd.rs:113:31
6: ribir_core::window::Window::draw_frame
at /home/kayo/devel/rust/ribir/ribir/core/src/window.rs:131:7
7: ribir::app::App::exec::{{closure}}
at /home/kayo/devel/rust/ribir/ribir/ribir/src/app.rs:142:16
8: winit::platform_impl::platform::sticky_exit_callback
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:884:9
9: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/x11/mod.rs:375:21
10: winit::platform_impl::platform::x11::EventLoop<T>::run_return
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/x11/mod.rs:483:27
11: winit::platform_impl::platform::EventLoop<T>::run_return
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:785:56
12: <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform/run_return.rs:51:9
13: ribir::app::App::exec
at /home/kayo/devel/rust/ribir/ribir/ribir/src/app.rs:96:5
14: storybook::main
at /home/kayo/devel/rust/ribir/ribir/dev-helper/src/example_framework.rs:49:7
15: core::ops::function::FnOnce::call_once
at /rustc/fcab24817c72ffbd6ffb66d92b7ddc0d3ee4d2f0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
https://github.com/RibirX/Ribir/blob/1dc7a541743e78ee1b7a45b895a8276e0ddf594d/ribir/src/backends/wgpu_backend.rs#L44
Steps To Reproduce
- Run any example with
RUST_BACKTRACE=1 cargo +nightly run
- See window with rendered UI for moment
- Get crashing with backtrace
Expected behavior Working examples without crashes.
Environment:
- Ribir version:
master
- Rust version:
nightly
- OS:
NixOS 23.05
- Mesa:
23.03
- Linux:
6.5.1
- HW:
AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.54, 6.5.1)
Questionnaire
- [ ] I'm interested in fixing this myself but don't know where to start
- [ ] I would like to fix and I have a solution
- [x] I don't have time to fix this right now, but maybe later
I was unable to reproduce it on my existing device. It looks like a wgpu
related bug. After completing the v0.1 related documents, I will try to reproduce it and analyze this bug in depth.
@M-Adoo I have no issues with wgpu
.
All examples from wgpu
repository works as expected.
thanks, I will dig into it.