Winit example crashes on Linux with AMD GPU
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
The `with_winit` example crashes on my system when I try to run it. The `with_bevy` example works fine though.
OS: Arch Linux
Desktop Environment: Cinnamon
GPU: AMD RX 570
backtrace:
```
[examples/with_winit/src/hot_reload.rs:19] &Path::new(env!("CARGO_MANIFEST_DIR")).join("../../shader").canonicalize().unwrap() = "/home/billydm/Dev/vello/shader"
thread 'main' panicked at 'failed to get surface texture: Timeout', examples/with_winit/src/main.rs:189:18
stack backtrace:
0: rust_begin_unwind
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/panicking.rs:65:14
2: core::result::unwrap_failed
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/result.rs:1791:5
3: core::result::Result::expect
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/result.rs:1070:23
4: with_winit::run::{{closure}}::{{closure}}
at ./examples/with_winit/src/main.rs:186:35
5: winit::platform_impl::platform::sticky_exit_callback
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:849:9
6: winit::platform_impl::platform::x11::EventLoop::run_return::single_iteration
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:380:21
7: winit::platform_impl::platform::x11::EventLoop::run_return
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:488:27
8: winit::platform_impl::platform::x11::EventLoop::run
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/x11/mod.rs:503:25
9: winit::platform_impl::platform::EventLoop::run
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:755:56
10: winit::event_loop::EventLoop::run
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/event_loop.rs:278:9
11: with_winit::run::{{closure}}
at ./examples/with_winit/src/main.rs:102:5
12: as core::future::future::Future>::poll
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/future/mod.rs:91:19
13: pollster::block_on
at /home/billydm/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.5/src/lib.rs:125:15
14: with_winit::main
at ./examples/with_winit/src/main.rs:244:9
15: core::ops::function::FnOnce::call_once
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/ops/function.rs:251:5
```
Also here is the output of the `with_bevy` example if it's any help.
```
2023-01-25T22:26:42.486751Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
2023-01-25T22:26:42.501557Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 570 Series", vendor: 4098, device: 26591, device_type: DiscreteGpu, driver: "AMD open-source driver", driver_info: "2022.Q4.4 (LLPC)", backend: Vulkan }
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/with_winit/src/main.rs around lines 186-189 and run the with_winit example on Linux with the reported AMD GPU setup. Compare its behavior with the working with_bevy example and use the supplied backtrace to investigate the surface-texture timeout. Done means the with_winit example no longer crashes in this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, linux, rust
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100