Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

App crashes with skia vulkan renderer #3850

Closed
qarmin opened this issue Nov 5, 2023 · 3 comments
Closed

App crashes with skia vulkan renderer #3850

qarmin opened this issue Nov 5, 2023 · 3 comments
Labels
a:renderer-skia Skia Renderer (mS) bug Something isn't working

Comments

@qarmin
Copy link

qarmin commented Nov 5, 2023

Slint 1.3.0 master branch - 8becbeb

Steps to reproduce(not able to create smaller project yet ) - https://github.com/qarmin/czkawka/tree/84b714555099e1451f7f81af6adc7ad0b5198e02

git clone https://github.com/qarmin/czkawka.git
cd czkawka
git checkout 84b714555099e1451f7f81af6adc7ad0b5198e02
cd czkawka_slint_gui
SLINT_BACKEND=skia cargo run --release # Multiple times

OS

System:
  Host: rafal-komputer Kernel: 6.5.0-10-generic arch: x86_64 bits: 64
    compiler: N/A Desktop: GNOME v: 45.0 Distro: Ubuntu 23.10 (Mantic Minotaur)
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: Sapphire driver: amdgpu v: kernel arch: GCN-4 bus-ID: 01:00.0
    temp: 49.0 C
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 23.2.0 driver: X:
    loaded: amdgpu unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi
    gpu: amdgpu resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 23.2.1-1ubuntu3 renderer: AMD Radeon RX 570
    Series (polaris10 LLVM 15.0.7 DRM 3.54 6.5.0-10-generic)
    direct-render: Yes

Crashes

thread 'main' panicked at czkawka_slint_gui/src/main.rs:60:15:
called `Result::unwrap()` on an `Err` value: Other("Error re-creating Vulkan swap chain: the provided `image_extent` ([382, 503]) is not within the range (min: [411, 503], max: [411, 503]) supported by the surface for this device")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

or errors

Failed to initialize Skia GPU renderer: Error creating Vulkan swapchain: the provided `image_extent` ([2000, 600]) is not within the range (min: [800, 600], max: [800, 600]) supported by the surface for this device . Falling back to software rendering
simplescreenrecorder-2023-11-05_06.36.03.mp4
   0:     0x55dfd3010dbc - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55dfd3010dbc - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55dfd3010dbc - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55dfd3010dbc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h678bbcf9da6d7d75
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55dfd3041e6c - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9
   5:     0x55dfd3041e6c - core::fmt::write::hb8eaf5a8e45a738e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21
   6:     0x55dfd300c51e - std::io::Write::write_fmt::h9663fe36b2ee08f9
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15
   7:     0x55dfd3010ba4 - std::sys_common::backtrace::_print::hcd4834796ee88ad2
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55dfd3010ba4 - std::sys_common::backtrace::print::h1360e9450e4f922a
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55dfd3012513 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22
  10:     0x55dfd301222c - std::panicking::default_hook::h6d75f5747cab6e8d
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:290:9
  11:     0x55dfd3012a99 - std::panicking::rust_panic_with_hook::h57e78470c47c84de
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:707:13
  12:     0x55dfd3012997 - std::panicking::begin_panic_handler::{{closure}}::h3dfd2453cf356ecb
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:599:13
  13:     0x55dfd30112e6 - std::sys_common::backtrace::__rust_end_short_backtrace::hdb177d43678e4d7e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:170:18
  14:     0x55dfd30126e2 - rust_begin_unwind
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
  15:     0x55dfd1e530d3 - core::panicking::panic_fmt::hd1e971d8d7c78e0e
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
  16:     0x55dfd1e534da - core::result::unwrap_failed::hccb456d39e9c31fc
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5
  17:     0x55dfd20a18c8 - czkawka_slint::main::hc6d6979ba201dbf7
  18:     0x55dfd2091f33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8a551d9ebd1106c0
  19:     0x55dfd20a7b89 - std::rt::lang_start::{{closure}}::h26df6e97a4e31321
  20:     0x55dfd3004e7b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hbcc4f8a3f5ada78c
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:284:13
  21:     0x55dfd3004e7b - std::panicking::try::do_call::he5f117a9e13dadde
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
  22:     0x55dfd3004e7b - std::panicking::try::h2f3af9afce3a0443
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
  23:     0x55dfd3004e7b - std::panic::catch_unwind::h6d6c387f38ef05ea
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
  24:     0x55dfd3004e7b - std::rt::lang_start_internal::{{closure}}::h6ca09d5905711415
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148:48
  25:     0x55dfd3004e7b - std::panicking::try::do_call::ha9fd18ea06654a4b
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
  26:     0x55dfd3004e7b - std::panicking::try::hda5c2a4432362341
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
  27:     0x55dfd3004e7b - std::panic::catch_unwind::h440f731b142bc235
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
  28:     0x55dfd3004e7b - std::rt::lang_start_internal::hc0b4e50f058f62ce
                               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148:20
  29:     0x55dfd20a1d75 - main
  30:     0x7f07e58280d0 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  31:     0x7f07e5828189 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  32:     0x55dfd1e53cb5 - _start
  33:                0x0 - <unknown>

@qarmin qarmin changed the title App crashes with skia renderer App crashes with skia vulkan renderer Nov 5, 2023
@tronical tronical added bug Something isn't working a:renderer-skia Skia Renderer (mS) labels Nov 5, 2023
@tronical
Copy link
Member

tronical commented Nov 5, 2023

Interesting, looks like a race condition - oddly sometimes already on startup. I’ll try to add some way to enable validation layers, that might help to get to the bottom of this.

Thanks for the detailed report btw:)

@tronical
Copy link
Member

tronical commented Nov 5, 2023

Porting to a newer Vulkano might help: vulkano-rs/vulkano#2236
KhronosGroup/Vulkan-Docs#1144

tronical added a commit that referenced this issue Nov 11, 2023
This might fix the issue with resizing causing swapchain re-creation
errors.

cc #3850
tronical added a commit that referenced this issue Nov 11, 2023
This might fix the issue with resizing causing swapchain re-creation
errors, because "Swapchain creation no longer returns an error when the
swapchain extent doesn't match the current surface extent."

cc #3850
@tronical
Copy link
Member

@qarmin Would you be able to try out #3902 ? I'm a bit limited at the moment with my abilities to reproduce this, but I think I've seen this before. The PR compiles and works for me on macOS, but the issue is - AFAIK - only visible on Linux.

tronical added a commit that referenced this issue Nov 11, 2023
This might fix the issue with resizing causing swapchain re-creation
errors, because "Swapchain creation no longer returns an error when the
swapchain extent doesn't match the current surface extent."

cc #3850
ogoffart pushed a commit that referenced this issue Nov 13, 2023
This might fix the issue with resizing causing swapchain re-creation
errors, because "Swapchain creation no longer returns an error when the
swapchain extent doesn't match the current surface extent."

cc #3850
@qarmin qarmin closed this as completed Nov 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
a:renderer-skia Skia Renderer (mS) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants