iced: Panic when running any of the examples under Linux Intel GPU

Environment:

openSUSE Tumbleweed, kernel 5.3.11. KDE Plasma 5.17.3 System font: Noto Sans Mesa DRI Intel® HD Graphics 620 (Kaby Lake GT2) Mesa 19.2.4 Vulkan Instance Version: 1.1.127

Running cargo run --example tour causes panic with the following stack trace (snipped):

  15: core::result::Result<T,E>::unwrap
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/result.rs:933
  16: wgpu_glyph::builder::GlyphBrushBuilder<()>::using_fonts_bytes::{{closure}}
             at /home/dmitry/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu_glyph-0.6.0/src/builder.rs:44
  17: core::iter::adapters::map_fold::{{closure}}
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/adapters/mod.rs:694
  18: core::iter::traits::iterator::Iterator::fold::ok::{{closure}}
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/traits/iterator.rs:1813
  19: core::iter::traits::iterator::Iterator::try_fold
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/traits/iterator.rs:1694
  20: core::iter::traits::iterator::Iterator::fold
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/traits/iterator.rs:1816
  21: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/adapters/mod.rs:727
  22: core::iter::traits::iterator::Iterator::for_each
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/traits/iterator.rs:616
  23: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::spec_extend
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/liballoc/vec.rs:1966
  24: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/liballoc/vec.rs:1949
  25: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/liballoc/vec.rs:1836
  26: core::iter::traits::iterator::Iterator::collect
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/iter/traits/iterator.rs:1478
  27: wgpu_glyph::builder::GlyphBrushBuilder<()>::using_fonts_bytes
             at /home/dmitry/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu_glyph-0.6.0/src/builder.rs:41
  28: iced_wgpu::text::Pipeline::new
             at wgpu/src/text.rs:36
  29: iced_wgpu::renderer::Renderer::new
             at wgpu/src/renderer.rs:64
  30: <iced_wgpu::renderer::Renderer as iced_native::renderer::windowed::Windowed>::new
             at wgpu/src/renderer.rs:417
  31: iced_winit::application::Application::run
             at ./winit/src/application.rs:115
  32: iced::application::Application::run
             at ./src/application.rs:140
  33: iced::sandbox::Sandbox::run
             at ./src/sandbox.rs:128
  34: tour::main
             at examples/tour.rs:10

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 22 (8 by maintainers)

Most upvoted comments

I’m getting this also on linux. The error message tells nothing, but the extended stack says its wgpu :

  15: core::option::Option<T>::unwrap                                                                             
             at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/macros.rs:12                          
  16: wgpu_request_adapter                                                                                        
             at /home/aaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.1/src/instance.rs:474 
  17: wgpu::Adapter::request                                                                                      
             at /home/aaa/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.4.0/src/lib.rs:545             
  18: iced_wgpu::renderer::Renderer::new
             at /home/aaa/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_wgpu-0.1.0/src/renderer.rs:51
  19: <iced_wgpu::renderer::Renderer as iced_native::renderer::windowed::Windowed>::new
             at /home/aaa/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_wgpu-0.1.0/src/renderer.rs:417

Edit: okay the fix for arch linux is to install vulkan-intel

I have opened #74, which should fix the issue.

Sorry to hear that.

This is one of the main reasons I think having a renderer alternative is important. iced_wgpu still needs to mature quite a bit.

In the meantime, maybe we could avoid panicking in wgpu_glyph and embed a fallback font that is guaranteed to work for these cases.

I also have this issues, as all my fonts are OpenType fonts, specifically NimbusSans for sans-serif, NimbusRoman for serif, and NimbusMonoPS for monospace.

I believe these fonts are from KDE which is my desktop environment on Arch Linux.