iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm

Home Page:https://iced.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on raspberry pi when using wgpu feature

spamviech opened this issue · comments

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?

Running the following app on a rasperry pi crashes, when the "wgpu"-feature is enabled (it works without the feature enabled).
The error message is a "unwrap on a None-value" in wgpu-core (see below).
This was not an issue with iced v0.10.
In case it is relevant:

  • the app was cross-compiled on a windows-machine using cross
  • the rapberry-pi is running default 64bit raspbian image
use iced::{Application, Settings};

struct Dummy;

impl Application for Dummy {
    type Executor = iced::executor::Default;
    type Flags = ();
    type Message = ();
    type Theme = iced::Theme;

    fn new((): Self::Flags) -> (Self, iced::Command<Self::Message>) {
        (Dummy, iced::Command::none())
    }

    fn title(&self) -> String {
        String::from("Dummy")
    }

    fn update(&mut self, (): Self::Message) -> iced::Command<Self::Message> {
        iced::Command::none()
    }

    fn view(&self) -> iced::Element<'_, Self::Message, Self::Theme, iced::Renderer> {
        iced::widget::Text::new("Test").into()
    }
}

fn main() -> iced::Result {
    Dummy::run(Settings::default())
}

Note: This reads similar to #2314
I decided to open a new issue, because the error message is different.

What is the expected behavior?

No crash, a window with the text "Test" is shown.

Version

crates.io release

Operating System

Linux

Do you have any log output?

$ RUST_BACKTRACE=full ~/bin/zugkontrolle-5.0.0-aarch64-unknown-linux-gnu
thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-0.19.3/src/instance.rs:521:39:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:       0x557e8a01d8 - <unknown>
   1:       0x557e6f860c - <unknown>
   2:       0x557e875c30 - <unknown>
   3:       0x557e8a1920 - <unknown>
   4:       0x557e8a1120 - <unknown>
   5:       0x557e8a2180 - <unknown>
   6:       0x557e8a1c04 - <unknown>
   7:       0x557e8a1b98 - <unknown>
   8:       0x557e8a1b90 - <unknown>
   9:       0x557e691a48 - <unknown>
  10:       0x557e691b54 - <unknown>
  11:       0x557e9b7c40 - <unknown>
  12:       0x557ebb7584 - <unknown>
  13:       0x557ebd6f0c - <unknown>
  14:       0x557e6c8f04 - <unknown>
  15:       0x557eb93094 - <unknown>
  16:       0x557ebc9464 - <unknown>
  17:       0x557eb92d48 - <unknown>
  18:       0x7f9c02ce18 - __libc_start_main
                               at ./csu/../csu/libc-start.c:308:16
  19:       0x557e6becac - <unknown>
Abgebrochen