WGPU errors trying to run my ICED app on Redox

I am trying to run my ICED app on Redox but fall at the first hurdle. WGPU panics with the following stacktrace:

thread ‘main’ panicked at /home/trevor/.cargo/registry/src/index.crates.io-6f17d22bba15001f /wgpu-core-0.19.4/src/instance.rs:521:39:

called “Option::unwrap()' on a “None” value

stack backtrace:
<std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt at ??:?
core::fmt::write at ??:?
std::io::Write::write_fmt at ??:?
std::sys_common::backtrace::print at ??:?
std::panicking::default_hook::{{closure}} at std.9322914d55514030-cgu.13:?
std::panicking::default_hook at ??:?
std::panicking::rust_panic_with_hook at ??:?
std::panicking::begin_panic_handler::{{closure}} at std.9322914d55514030-cgu.09:?
std::sys_common::backtrace::__rust_end_short_backtrace at ??:?
rust_begin_unwind at ??:?
core::panicking::panic_fmt at ??:?
core::panicking::panic at ??:?
core::option::unwrap_failed at ??:?
wgpu_core::instance::<impl wgpu_core::global::Global<G>>::instance_create_surface at ??:?
<T as wgpu::context::DynContext>::instance_create_surface at ??:?
wgpu::Instance::create_surface_unsafe at ??:?
wgpu::Instance::create_surface at ??:?
<iced_winit::program::run::Runner<Message,F,C> as winit::application::ApplicationHandler<iced_runtime::Action<Message>>>::resumed::{{closure}} at ??:?
futures_executor::local_pool::block_on at ??:?
<iced_winit::program::run::Runner<Message,F,C> as winit::application::ApplicationHandler<iced_runtime::Action<Message>>>::resumed at ??:?
winit::platform_impl::platform::event_loop::EventLoop<T>::run at ??:?
iced_winit::program::run at ??:?
rusty_calc::main at rusty_calc.d512ffc9b25dc1e2-cgu.13:?
std::sys_common::backtrace::__rust_begin_short_backtrace at ??:?
std::rt::lang_start::{{closure}} at ??:?
std::panicking::try at ??:?
std::rt::lang_start_internal at ??:?
main at ??:?
relibc_start at ??:?

The panic is in the function instance_create_surface at these lines

        //  This is only None if there's no instance at all.
        let hal_surface = hal_surface.unwrap()?;

I really don’t know if this is my problem or ICED or WGPU or Redox. Any pointers on how to resolve would be really helpful.

What if you use the software renderer? ICED_BACKEND=tiny-skia cargo run

Yes works with tiny-skia. :smiley:

I suppose I should try and raise a bug with WGPU guys.

Also I get some strange rendering behaviour with tiny-skia, both in Linux and Redox. Doesn’t seem render the view all the time until I resize the window, but need some more investigation on that.

Oh I also get that behavior: when the window is maximized after being minimized, it won’t render at all until it’s, like you mention, resized, or until something forces a re-render in it. I didn’t bother to report it because it seemed so specific, but it seems it’s not only me.