Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wgpu_backend: Crash with timeout on surface.get_current_texture() #443

Open
1 of 3 tasks
katyo opened this issue Oct 23, 2023 · 3 comments
Open
1 of 3 tasks

wgpu_backend: Crash with timeout on surface.get_current_texture() #443

katyo opened this issue Oct 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@katyo
Copy link

katyo commented Oct 23, 2023

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.

let surface_tex = self.surface.get_current_texture().unwrap();

Steps To Reproduce

  1. Run any example with RUST_BACKTRACE=1 cargo +nightly run
  2. See window with rendered UI for moment
  3. 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
  • I don't have time to fix this right now, but maybe later
@katyo katyo added the bug Something isn't working label Oct 23, 2023
@M-Adoo
Copy link
Collaborator

M-Adoo commented Oct 23, 2023

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.

@katyo
Copy link
Author

katyo commented Oct 23, 2023

@M-Adoo I have no issues with wgpu.
All examples from wgpu repository works as expected.

@M-Adoo
Copy link
Collaborator

M-Adoo commented Oct 23, 2023

thanks, I will dig into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants