slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
15.49k stars 499 forks source link

Winit-skia-vulkan crash #5188

Open flukejones opened 3 weeks ago

flukejones commented 3 weeks ago

System is:

Features enabled:

[dependencies.slint]
git = "https://github.com/slint-ui/slint.git"
default-features = false
features = [
    "std",
    "gettext",
    "compat-1-2",
    "backend-linuxkms",
    "backend-winit-wayland",
    "renderer-skia-opengl",
    "renderer-skia-vulkan",
]

[build-dependencies.slint-build]
git = "https://github.com/slint-ui/slint.git"

Logs:

❯ RUST_BACKTRACE=full rog-control-center
[WARN  rog_control_center::tray] supergfxd version = 5.2.2
Found aura device at /org/asuslinux/19b6_2_3, org.asuslinux.Aura
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
thread 'main' panicked at /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vulkano-0.34.1/src/sync/future/fence_signal.rs:555:34:
called `Result::unwrap()` on an `Err` value: DeviceLost
stack backtrace:
   0:     0x56185ecf0fdf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hacdd300c41e1180e
   1:     0x56185e5e9c7b - core::fmt::write::h54e06a8869eec392
   2:     0x56185ecbeb22 - std::io::Write::write_fmt::h035a916024adb57d
   3:     0x56185ecf6129 - std::sys_common::backtrace::print::h6f519751fcbce886
   4:     0x56185ecf594e - std::panicking::default_hook::{{closure}}::he6a59efceecbef2b
   5:     0x56185ecf6b3f - std::panicking::rust_panic_with_hook::ha834086436b49044
   6:     0x56185ecf6492 - std::panicking::begin_panic_handler::{{closure}}::h0fa97b08b04bd720
   7:     0x56185ecf63e9 - std::sys_common::backtrace::__rust_end_short_backtrace::h2e3eab6f793deff8
   8:     0x56185ecf63d6 - rust_begin_unwind
   9:     0x56185e5e7e22 - core::panicking::panic_fmt::hbecf727900b5586b
  10:     0x56185e5ef175 - core::result::unwrap_failed::h8d39b56c801f3551
  11:     0x56185e6fdc47 - core::ptr::drop_in_place<vulkano::sync::future::fence_signal::FenceSignalFuture<vulkano::swapchain::acquire_present::PresentFuture<vulkano::sync::future::join::JoinFuture<alloc::boxed::Box<dyn vulkano::sync::future::GpuFuture>,vulkano::swapchain::acquire_present::SwapchainAcquireFuture>>>>::h374b222a1dd69611
  12:     0x56185e6f5366 - <i_slint_renderer_skia::vulkan_surface::VulkanSurface as i_slint_renderer_skia::Surface>::render::hc62e924aad7c016b
  13:     0x56185e70bc6f - i_slint_renderer_skia::SkiaRenderer::internal_render_with_post_callback::hb1ee461ea954d7a9
  14:     0x56185e66325f - <i_slint_backend_winit::renderer::skia::WinitSkiaRenderer as i_slint_backend_winit::renderer::WinitCompatibleRenderer>::render::h60d5069a601f11d9
  15:     0x56185e67cc4a - i_slint_backend_winit::event_loop::EventLoopState::process_event::h9f253a3586afcc4d
  16:     0x56185e67b4b5 - winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events::h1dfea887244349e3
  17:     0x56185e6767ab - <i_slint_backend_winit::Backend as i_slint_core::platform::Platform>::run_event_loop::h0b585fd12c4dbda6
  18:     0x56185ec81504 - slint::run_event_loop_until_quit::he607875327732918
  19:     0x56185e596169 - rog_control_center::main::{{closure}}::h636fa02feddc3131
  20:     0x56185e58b849 - rog_control_center::main::h2a83bb7b8242be83
  21:     0x56185e57b583 - std::sys_common::backtrace::__rust_begin_short_backtrace::h829a64e3b3de9d33
  22:     0x56185e597f16 - main
  23:     0x7f2acfb5a088 - __libc_start_call_main
  24:     0x7f2acfb5a14b - __libc_start_main_impl
  25:     0x56185e578b35 - _start
  26:                0x0 - <unknown>
Aborted (core dumped)

OpenGL seems to work fine here

tronical commented 3 weeks ago

I'm curious here, does this happen right on startup or after some time of usage?

flukejones commented 3 weeks ago

On startup

tronical commented 3 weeks ago

Darn. Ok, after commit b00752514c0bfc24b820dae56d18d9d271bea260 removing "renderer-skia-vulkan" in your Cargo.toml should be a way to avoid this code path. It sucks that we can't handle this panic :(