kas-gui / kas

Another GUI toolkit
Apache License 2.0
893 stars 27 forks source link

Error in Surface::configure: surface does not support the adapter's queue family #388

Closed flukejones closed 1 year ago

flukejones commented 1 year ago

I get this error with both the Intel GPU and the Nvidia GPU.

System details:

OS: Fedora Linux 38 (Workstation Edition) x86_64 
Kernel: 6.4.0-0.rc0.20230426git0cfd8703e7da.4.fc38.x86_64 
Shell: bash 5.2.15 
Resolution: 5120x2160 
DE: GNOME 44.0 
WM: Mutter 
CPU: 12th Gen Intel i9-12900H (20) @ 4.900GHz 
GPU: NVIDIA Geforce RTX 3070 Ti Laptop GPU 
GPU: Intel Alder Lake-P
RUST_BACKTRACE=full cargo run --example gallery
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/examples/gallery`
warning: queue 0x55c89832d820 destroyed while proxies still attached:
  wl_registry@2 still attached
warning: queue 0x55c898dd2150 destroyed while proxies still attached:
  wl_registry@43 still attached
warning: queue 0x55c89832e000 destroyed while proxies still attached:
  wl_display@1 still attached
thread 'main' panicked at 'Error in Surface::configure: surface does not support the adapter's queue family', /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:316:9
stack backtrace:
   0:     0x55c896f5d6ca - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55c896f5d6ca - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55c896f5d6ca - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x55c896f5d6ca - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55c896f8aa2e - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x55c896f59035 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x55c896f5d495 - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x55c896f5d495 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x55c896f5ed6f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x55c896f5eaab - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x55c896f5f378 - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x55c896f5f279 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  12:     0x55c896f5db36 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x55c896f5ef82 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x55c896f875e3 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  15:     0x55c89552b57c - wgpu::backend::direct::Context::handle_error_fatal::h9ee7b9909b35d030
                               at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:316:9
  16:     0x55c89552e4d9 - <wgpu::backend::direct::Context as wgpu::context::Context>::surface_configure::h579430fd0913bebb
                               at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:742:13
  17:     0x55c8955437b4 - <T as wgpu::context::DynContext>::surface_configure::h379816b0a923e48b
                               at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/context.rs:2053:9
  18:     0x55c8955b2184 - wgpu::Surface::configure::h1a85c5b4fae9f3f5
                               at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/lib.rs:4113:9
  19:     0x55c8952465f1 - <kas_wgpu::surface::Surface<C> as kas_core::shell::common::WindowSurface>::new::h142105ec26f8f5f6
                               at /home/luke/Projects/kas/crates/kas-wgpu/src/surface.rs:49:9
  20:     0x55c89511d9c8 - kas_core::shell::window::Window<S,T>::new::h633193b26d364d1a
                               at /home/luke/Projects/kas/crates/kas-core/src/shell/window.rs:141:23
  21:     0x55c8950a6d78 - kas_core::shell::shell::Shell<G,T>::add_boxed::h9abb316656b27921
                               at /home/luke/Projects/kas/crates/kas-core/src/shell/shell.rs:175:19
  22:     0x55c8950a6993 - kas_core::shell::shell::Shell<G,T>::add::ha41d3ebb724a3b67
                               at /home/luke/Projects/kas/crates/kas-core/src/shell/shell.rs:158:9
  23:     0x55c8952267c2 - gallery::main::hdb46862db528e276
                               at /home/luke/Projects/kas/examples/gallery.rs:593:5
  24:     0x55c89525c79b - core::ops::function::FnOnce::call_once::h2f4cd9fe90a17984
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5
  25:     0x55c8951b839e - std::sys_common::backtrace::__rust_begin_short_backtrace::hfa1c0be44b5c770a
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:134:18
  26:     0x55c89519c6f1 - std::rt::lang_start::{{closure}}::h76fb7ab50b83e658
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:166:18
  27:     0x55c896f5175c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd6efcd3bec896f2c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287:13
  28:     0x55c896f5175c - std::panicking::try::do_call::hce04e543bb1f4cbb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  29:     0x55c896f5175c - std::panicking::try::h3342dd4e1f680968
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  30:     0x55c896f5175c - std::panic::catch_unwind::h148ce1e59ac0cee7
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  31:     0x55c896f5175c - std::rt::lang_start_internal::{{closure}}::h25f9dda2057a67fe
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:48
  32:     0x55c896f5175c - std::panicking::try::do_call::h7caaaeaf9401650b
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  33:     0x55c896f5175c - std::panicking::try::he7d15285746cbbc2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  34:     0x55c896f5175c - std::panic::catch_unwind::h89fb4f50c0301fe0
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  35:     0x55c896f5175c - std::rt::lang_start_internal::h078acd489417d3c1
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:20
  36:     0x55c89519c6ca - std::rt::lang_start::hd2c84e7a63a64ca8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:165:17
  37:     0x55c89522bd2e - main
  38:     0x7f2b92368b4a - __libc_start_call_main
  39:     0x7f2b92368c0b - __libc_start_main@@GLIBC_2.34
  40:     0x55c89508c0b5 - _start
  41:                0x0 - <unknown>
warning: queue 0x55c897e3b490 destroyed while proxies still attached:
  wl_buffer@42 still attached
  wl_buffer@41 still attached
  wl_buffer@40 still attached
  wl_buffer@38 still attached
  wl_buffer@39 still attached
  wl_subsurface@33 still attached
  wl_surface@32 still attached
  wl_subsurface@31 still attached
  wl_surface@30 still attached
  wl_subsurface@29 still attached
  wl_surface@28 still attached
  wl_subsurface@27 still attached
  wl_surface@26 still attached
  wl_subsurface@25 still attached
  wl_surface@24 still attached
  xdg_wm_base@22 still attached
  wl_output@14 still attached
  xdg_activation_v1@13 still attached
  zwp_text_input_manager_v3@12 still attached
  zwp_pointer_constraints_v1@11 still attached
  zwp_relative_pointer_manager_v1@10 still attached
  wl_seat@9 still attached
  wp_fractional_scale_manager_v1@8 still attached
  wp_viewporter@7 still attached
  wl_subcompositor@6 still attached
  wl_shm@5 still attached
  wl_compositor@4 still attached
  wl_registry@2 still attached
Segmentation fault (core dumped)
dhardy commented 1 year ago

Thanks for the report.

This sounds like https://github.com/kas-gui/kas/issues/367, but that should have been fixed or worked around by using wgpu::PresentMode::Fifo.

Have you tried testing wgpu examples?

flukejones commented 1 year ago

It seems I get entirely different issues with wgpu examples. I filed an issue there with those https://github.com/gfx-rs/wgpu/issues/3747

dhardy commented 1 year ago

Unfortunate, but it does appear that WGPU is not really ready for prime-time. If you have concrete suggestions about how to improve Kas then please do so but I'm not interested in debugging this for now. (There's already #287 for a more general alternative.)

flukejones commented 1 year ago

Fair enough mate. I can't think of any alternatives except winit + selectable backends. Could use what you linked, skia, femtovg, SDL2, GBM/DRM/KMS etc.

Apologies for doing what is essentially a drive-by issue post.