iced: Immediate crash on Winit wayland backend and wgpu Vulkan renderer

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

All Iced programs (in the panic sample the game of life example) immediately crash when having vulkan & wayland backends chosen.

Environment: Sway 1.7 Intel alder lake graphics with Mesa 22.3.1

What is the expected behavior?

The application doesn’t crash or errors that vulkan & wayland is an unsupported combination (-> Use x11 & vulkan for actually working experience or wayland & gl for experience where most things excluding images work)

Version

master

Operative System

Linux

Do you have any log output?

RUST_BACKTRACE=1 WINIT_UNIX_BACKEND=wayland WGPU_BACKEND=vulkan cargo run --features iced/wgpu --package game_of_life
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/game_of_life`
thread 'main' panicked at 'Error in Surface::configure: parent device is lost', /home/jaakko/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.14.2/src/backend/direct.rs:274:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/core/src/panicking.rs:64:14
   2: wgpu::backend::direct::Context::handle_error_fatal
             at /home/jaakko/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.14.2/src/backend/direct.rs:274:9
   3: <wgpu::backend::direct::Context as wgpu::Context>::surface_configure
             at /home/jaakko/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.14.2/src/backend/direct.rs:1017:13
   4: wgpu::Surface::configure
             at /home/jaakko/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.14.2/src/lib.rs:3715:9
   5: <iced_wgpu::window::compositor::Compositor<Theme> as iced_graphics::window::compositor::Compositor>::configure_surface
             at ./wgpu/src/window/compositor.rs:157:9
   6: iced_winit::application::run_instance::{{closure}}
             at ./winit/src/application.rs:258:5
   7: iced_winit::application::run::{{closure}}
             at ./winit/src/application.rs:218:24
   8: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_return
             at /home/jaakko/.local/share/cargo/git/checkouts/winit-57d3141eaf559308/9404575/src/platform_impl/linux/wayland/event_loop/mod.rs:233:9
   9: winit::platform_impl::platform::EventLoop<T>::run_return
             at /home/jaakko/.local/share/cargo/git/checkouts/winit-57d3141eaf559308/9404575/src/platform_impl/linux/mod.rs:748:56
  10: <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return
             at /home/jaakko/.local/share/cargo/git/checkouts/winit-57d3141eaf559308/9404575/src/platform/run_return.rs:62:9
  11: iced_winit::application::platform::run
             at ./winit/src/application.rs:749:17
  12: iced_winit::application::run
             at ./winit/src/application.rs:193:5
  13: iced::application::Application::run
             at ./src/application.rs:216:12
  14: game_of_life::main
             at ./examples/game_of_life/src/main.rs:23:5
  15: core::ops::function::FnOnce::call_once
             at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/core/src/ops/function.rs:507:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Hi, I fixed it with the following command:

export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

@Dunckleosteus this is likely an issue with your vulkan and or driver installation. You shouldn’t be needing to tell libvulkan where to find icds.

Hi, thank you for your reply. How should I go about fixing the problem ? This may a be silly question but I am a complete linux beginner. Cheers !

Hi, I fixed it with the following command:

export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

Cheers @AmmarAbouZor