iced: All Examples: thread 'main' panicked at 'assertion failed: `(left == right)`
Hi! Total Rust noob here. Using Arch and an AMD GPU.
First, I could not start any example because of
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/instance.rs:474:5
I could fix that by installing Vulkan.
But now, I’m facing another Issue: Example apps start, but as soon as I move my mouse cursor over the example’s window, the app breaks with
>>>cargo run --package styling
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
Running `target/debug/styling`
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `1`', /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/hub.rs:120:9
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: std::panicking::rust_panic_with_hook
6: rust_begin_unwind
7: std::panicking::begin_panic_fmt
8: <wgpu_native::hub::Storage<T,I> as core::ops::index::Index<I>>::index
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/hub.rs:120
9: wgpu_native::command::command_encoder_begin_render_pass::{{closure}}
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/command/mod.rs:266
10: core::option::Option<T>::map
at /build/rust/src/rustc-1.42.0-src/src/libcore/option.rs:450
11: wgpu_native::command::command_encoder_begin_render_pass
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/command/mod.rs:264
12: wgpu_command_encoder_begin_render_pass
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.4.3/src/command/mod.rs:739
13: wgpu::CommandEncoder::begin_render_pass
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.4.0/src/lib.rs:1059
14: <iced_wgpu::window::backend::Backend as iced_native::window::backend::Backend>::draw
at ./wgpu/src/window/backend.rs:81
15: iced_winit::application::Application::run::{{closure}}
at ./winit/src/application.rs:317
16: winit::platform_impl::platform::sticky_exit_callback
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.0/src/platform_impl/linux/mod.rs:698
17: winit::platform_impl::platform::x11::EventLoop<T>::run_return
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.0/src/platform_impl/linux/x11/mod.rs:310
18: winit::platform_impl::platform::x11::EventLoop<T>::run
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.0/src/platform_impl/linux/x11/mod.rs:406
19: winit::platform_impl::platform::EventLoop<T>::run
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.0/src/platform_impl/linux/mod.rs:645
20: winit::event_loop::EventLoop<T>::run
at /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.0/src/event_loop.rs:148
21: iced_winit::application::Application::run
at ./winit/src/application.rs:200
22: iced::application::Application::run
at ./src/application.rs:177
23: iced::sandbox::Sandbox::run
at ./src/sandbox.rs:128
24: styling::main
at examples/styling/src/main.rs:8
25: std::rt::lang_start::{{closure}}
at /build/rust/src/rustc-1.42.0-src/src/libstd/rt.rs:67
26: std::panicking::try::do_call
27: __rust_maybe_catch_panic
28: std::rt::lang_start_internal
29: std::rt::lang_start
at /build/rust/src/rustc-1.42.0-src/src/libstd/rt.rs:67
30: main
31: __libc_start_main
32: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Any clue?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (6 by maintainers)
Yes. However, as you pointed out, it seems to be fixed in the
master
branch ofwgpu
.Not yet! This is one of the main shortcomings I want to tackle in the near future. It shouldn’t be too hard to put everything together, but I believe the Rust ecosystem is currently missing essential pieces:
raw-window-handle
for rendering (using either hardware or software). There is promising work happening insurfman
! Once these changes land, I think it should be possible to build backends withraqote
,piet
and/orskia
.glyph-brush
is great, but only supports TTF and does no shaping whatsoever. I believe we should keep an eye onallsorts
andrustybuzz
which seem to be tackling both parsing and shaping.