wgpu: Segmentation Fault on Hello Triangles Example
Description Running the hello triangles example gives:
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/wpguvoxels`
thread 'main' panicked at 'failed to configure swap chain on creation: Window is in use', /home/lily/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.8.1/src/device/mod.rs:4477:29
stack backtrace:
0: rust_begin_unwind
at /rustc/657bc01888e6297257655585f9c475a0801db6d2/library/std/src/panicking.rs:515:5
1: std::panicking::begin_panic_fmt
at /rustc/657bc01888e6297257655585f9c475a0801db6d2/library/std/src/panicking.rs:457:5
2: wgpu_core::device::<impl wgpu_core::hub::Global<G>>::device_create_swap_chain
at /home/lily/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.8.1/src/device/mod.rs:4477:29
3: <wgpu::backend::direct::Context as wgpu::Context>::device_create_swap_chain
at /home/lily/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.8.1/src/backend/direct.rs:794:27
4: wgpu::Device::create_swap_chain
at /home/lily/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.8.1/src/lib.rs:1659:17
5: wpguvoxels::run::{{closure}}
at ./src/main.rs:75:26
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/657bc01888e6297257655585f9c475a0801db6d2/library/core/src/future/mod.rs:80:19
7: pollster::block_on
at /home/lily/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.4/src/lib.rs:132:15
8: wpguvoxels::main
at ./src/main.rs:136:9
9: core::ops::function::FnOnce::call_once
at /rustc/657bc01888e6297257655585f9c475a0801db6d2/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[1] 567099 segmentation fault (core dumped) RUST_BACKTRACE=1 cargo run
Platform I am running this on Arch Linux x64 with BSPWM and an Nvidia 1070 driver version 465.31 (using nvidia-dkms package).
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (12 by maintainers)
Commits related to this issue
- [glsl\wgsl out] Remove unnecessary clones (#1492) * [glsl-out] Remove unnecessary clones * [wgsl-out] Remove unnecessary clones — committed to Patryk27/wgpu by Gordon-F 3 years ago
Oh interesting.
wgpu
would choose the adapter that matches the request closest. So in this case, sounds like it hello-triangle’s preference ended up selecting GL backend, and it failed to initialize properly. The selection itself is not a bug, but GL beckend needs to generally work.