Using Hyprland, i get following error after selecting a region:
thread 'main' panicked at src/main.rs:1106:22:
error handling configure event: no buffer_info for screenshot
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
To my knowledge, Hyprland supports all protocols specified in the readme.
Can you try v0.4.6? This sounds like an issue that was fixed a few weeks ago.
Not OP but adding to the report: running what should be 0.4.6 (according to the Nix package repo, however
shotman --version
givesshotman unknown
for some reason), on NixOS 24.05 with Hyprland 0.40.0 and getting the same error with the following stack:RUST_BACKTRACE=full shotman --copy --capture output thread 'main' panicked at src/main.rs:1129:22: error handling configure event: no buffer_info for screenshot stack backtrace: 0: 0x55bc69d18e99 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4886110ae7835fd2 1: 0x55bc69c66300 - core::fmt::write::h6fab83f0f5bc0c8f 2: 0x55bc69d2e3ad - std::io::Write::write_fmt::h64824cb874054607 3: 0x55bc69d19abe - std::sys_common::backtrace::print::hb8fea9d041077138 4: 0x55bc69d19690 - std::panicking::default_hook::{{closure}}::hc60f0f690c67943c 5: 0x55bc69d1a338 - std::panicking::rust_panic_with_hook::hd61e30fe5971d187 6: 0x55bc69d19d50 - std::panicking::begin_panic_handler::{{closure}}::h95d2684e28f89fd2 7: 0x55bc69d19ca6 - std::sys_common::backtrace::__rust_end_short_backtrace::h48780d898316fff8 8: 0x55bc69d19c93 - rust_begin_unwind 9: 0x55bc69c0df84 - core::panicking::panic_fmt::hdb89b5c14a056cec 10: 0x55bc69c0df42 - core::result::unwrap_failed::h850510ea6c159887 11: 0x55bc69c999f2 - wayland_client::event_queue::queue_callback::ha52287389ca6ae2a 12: 0x55bc69cd4697 - <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events::hf2739d42d61a7c4b 13: 0x55bc69ca7a51 - calloop::loop_logic::EventLoop<Data>::run::h572c86e12a7c2f8d 14: 0x55bc69cc3ae7 - shotman::main::hc6d5094ef40a3261 15: 0x55bc69cb0dc3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h049206d86e37fb73 16: 0x55bc69cbac1b - main 17: 0x7fa107a4e10e - __libc_start_call_main 18: 0x7fa107a4e1c9 - __libc_start_main@@GLIBC_2.34 19: 0x55bc69c13765 - _start 20: 0x0 - <unknown>
Thanks!
Can you run
WAYLAND_DEBUG=1 shotman --copy --capture output -vdebug
?
Yes, this is the output:
[1719628982.544000] -> wl_display@1.get_registry (wl_registry@2) [1719628982.544027] -> wl_display@1.sync (wl_callback@3) [1719628982.544770] <- wl_registry@2.global, (1, Some("wl_seat"), 9) [1719628982.544803] <- wl_registry@2.global, (2, Some("wl_data_device_manager"), 3) [1719628982.544824] <- wl_registry@2.global, (3, Some("wl_compositor"), 6) [1719628982.544844] <- wl_registry@2.global, (4, Some("wl_subcompositor"), 1) [1719628982.544869] <- wl_registry@2.global, (5, Some("wl_shm"), 1) [1719628982.544892] <- wl_registry@2.global, (6, Some("wp_viewporter"), 1) [1719628982.544911] <- wl_registry@2.global, (7, Some("wp_tearing_control_manager_v1"), 1) [1719628982.544934] <- wl_registry@2.global, (8, Some("wp_fractional_scale_manager_v1"), 1) [1719628982.544957] <- wl_registry@2.global, (9, Some("zxdg_output_manager_v1"), 3) [1719628982.544980] <- wl_registry@2.global, (10, Some("wp_cursor_shape_manager_v1"), 1) [1719628982.545005] <- wl_registry@2.global, (11, Some("zwp_idle_inhibit_manager_v1"), 1) [1719628982.545027] <- wl_registry@2.global, (12, Some("zwp_relative_pointer_manager_v1"), 1) [1719628982.545050] <- wl_registry@2.global, (13, Some("zxdg_decoration_manager_v1"), 1) [1719628982.545077] <- wl_registry@2.global, (14, Some("wp_alpha_modifier_v1"), 1) [1719628982.545096] <- wl_registry@2.global, (15, Some("zwlr_gamma_control_manager_v1"), 1) [1719628982.545115] <- wl_registry@2.global, (16, Some("ext_foreign_toplevel_list_v1"), 1) [1719628982.545132] <- wl_registry@2.global, (17, Some("zwp_pointer_gestures_v1"), 3) [1719628982.545157] <- wl_registry@2.global, (18, Some("zwlr_foreign_toplevel_manager_v1"), 3) [1719628982.545179] <- wl_registry@2.global, (19, Some("zwp_keyboard_shortcuts_inhibit_manager_v1"), 1) [1719628982.545200] <- wl_registry@2.global, (20, Some("zwp_text_input_manager_v3"), 1) [1719628982.545219] <- wl_registry@2.global, (21, Some("zwp_pointer_constraints_v1"), 1) [1719628982.545237] <- wl_registry@2.global, (22, Some("zwlr_output_power_manager_v1"), 1) [1719628982.545253] <- wl_registry@2.global, (23, Some("xdg_activation_v1"), 1) [1719628982.545276] <- wl_registry@2.global, (24, Some("ext_idle_notifier_v1"), 1) [1719628982.545296] <- wl_registry@2.global, (25, Some("ext_session_lock_manager_v1"), 1) [1719628982.545315] <- wl_registry@2.global, (26, Some("zwp_input_method_manager_v2"), 1) [1719628982.545336] <- wl_registry@2.global, (27, Some("zwp_virtual_keyboard_manager_v1"), 1) [1719628982.545356] <- wl_registry@2.global, (28, Some("zwlr_virtual_pointer_manager_v1"), 2) [1719628982.545377] <- wl_registry@2.global, (29, Some("zwlr_output_manager_v1"), 4) [1719628982.545398] <- wl_registry@2.global, (30, Some("org_kde_kwin_server_decoration_manager"), 1) [1719628982.545421] <- wl_registry@2.global, (31, Some("hyprland_focus_grab_manager_v1"), 1) [1719628982.545441] <- wl_registry@2.global, (32, Some("zwp_tablet_manager_v2"), 1) [1719628982.545460] <- wl_registry@2.global, (33, Some("zwlr_layer_shell_v1"), 5) [1719628982.545486] <- wl_registry@2.global, (34, Some("wp_presentation"), 1) [1719628982.545513] <- wl_registry@2.global, (35, Some("xdg_wm_base"), 6) [1719628982.545533] <- wl_registry@2.global, (36, Some("zwlr_data_control_manager_v1"), 2) [1719628982.545552] <- wl_registry@2.global, (37, Some("zwp_primary_selection_device_manager_v1"), 1) [1719628982.545572] <- wl_registry@2.global, (38, Some("xwayland_shell_v1"), 1) [1719628982.545597] <- wl_registry@2.global, (39, Some("wl_drm"), 2) [1719628982.545623] <- wl_registry@2.global, (40, Some("zwp_linux_dmabuf_v1"), 5) [1719628982.545647] <- wl_registry@2.global, (41, Some("hyprland_toplevel_export_manager_v1"), 2) [1719628982.545670] <- wl_registry@2.global, (42, Some("zwp_text_input_manager_v1"), 1) [1719628982.545695] <- wl_registry@2.global, (43, Some("hyprland_global_shortcuts_manager_v1"), 1) [1719628982.545715] <- wl_registry@2.global, (44, Some("zwlr_screencopy_manager_v1"), 3) [1719628982.545734] <- wl_registry@2.global, (45, Some("wp_drm_lease_device_v1"), 1) [1719628982.545753] <- wl_registry@2.global, (46, Some("wp_drm_lease_device_v1"), 1) [1719628982.545772] <- wl_registry@2.global, (47, Some("wp_drm_lease_device_v1"), 1) [1719628982.545798] <- wl_registry@2.global, (48, Some("wl_output"), 4) [1719628982.545816] <- wl_registry@2.global, (49, Some("wl_output"), 4) [1719628982.545843] <- wl_callback@3.done, (1087) [1719628982.545858] <- wl_display@1.delete_id, (3) [1719628982.545884] -> wl_registry@2.bind (5, Some("wl_shm"), 1, wl_shm@3) [1719628982.545909] -> wl_registry@2.bind (44, Some("zwlr_screencopy_manager_v1"), 3, zwlr_screencopy_manager_v1@4) [1719628982.545937] -> wl_registry@2.bind (6, Some("wp_viewporter"), 1, wp_viewporter@5) [1719628982.545958] -> wl_registry@2.bind (1, Some("wl_seat"), 7, wl_seat@6) [1719628982.545987] -> wl_registry@2.bind (2, Some("wl_data_device_manager"), 3, wl_data_device_manager@7) thread 'main' panicked at src/main.rs:166:6: called `Result::unwrap()` on an `Err` value: the requested global was not found in the registry note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Just fyi this is on hyprland 0.41.2 now.
Hi. I intend to maintain the void linux package and I'm getting a similar error. My system uses void linux with the river compositor, which also supports the required protocols. The traces are as follows:
$ shotman --version shotman v0.4.6 $ RUST_BACKTRACE=full shotman --capture=output thread 'main' panicked at src/main.rs:1129:22: error handling configure event: no buffer_info for screenshot stack backtrace: 0: 0x5649ebe83aaf - <unknown> 1: 0x5649ebdd2cc3 - <unknown> 2: 0x5649ebe52a32 - <unknown> 3: 0x5649ebe8560a - <unknown> 4: 0x5649ebe84dd7 - <unknown> 5: 0x5649ebe86047 - <unknown> 6: 0x5649ebe85932 - <unknown> 7: 0x5649ebe85889 - <unknown> 8: 0x5649ebe85876 - <unknown> 9: 0x5649ebd67792 - <unknown> 10: 0x5649ebd67ba5 - <unknown> 11: 0x5649ebd7b622 - <unknown> 12: 0x5649ebe46ab7 - <unknown> 13: 0x5649ebdf99bf - <unknown> 14: 0x5649ebe21dc2 - <unknown> 15: 0x5649ebe49a03 - <unknown> 16: 0x5649ebe16dd7 - <unknown> 17: 0x7fc047889ffb - libc_start_main_stage2 at ./src/env/__libc_start_main.c:94:2 $ WAYLAND_DEBUG=1 shotman --copy --capture output -vdebug [1721858499.001437] -> wl_display@1.get_registry (wl_registry@2) [1721858499.001571] -> wl_display@1.sync (wl_callback@3) [1721858499.001719] <- wl_registry@2.global, (1, Some("wl_compositor"), 6) [1721858499.001830] <- wl_registry@2.global, (2, Some("wp_security_context_manager_v1"), 1) [1721858499.001907] <- wl_registry@2.global, (3, Some("wl_shm"), 1) [1721858499.001980] <- wl_registry@2.global, (4, Some("wp_single_pixel_buffer_manager_v1"), 1) [1721858499.002022] <- wl_registry@2.global, (5, Some("wp_viewporter"), 1) [1721858499.002061] <- wl_registry@2.global, (6, Some("wp_fractional_scale_manager_v1"), 1) [1721858499.002099] <- wl_registry@2.global, (7, Some("wl_subcompositor"), 1) [1721858499.002136] <- wl_registry@2.global, (8, Some("wp_cursor_shape_manager_v1"), 1) [1721858499.002177] <- wl_registry@2.global, (9, Some("xdg_wm_base"), 5) [1721858499.002215] <- wl_registry@2.global, (10, Some("zxdg_decoration_manager_v1"), 1) [1721858499.002253] <- wl_registry@2.global, (11, Some("zwlr_layer_shell_v1"), 4) [1721858499.002289] <- wl_registry@2.global, (12, Some("xdg_activation_v1"), 1) [1721858499.002328] <- wl_registry@2.global, (13, Some("wl_data_device_manager"), 3) [1721858499.002366] <- wl_registry@2.global, (14, Some("zwp_primary_selection_device_manager_v1"), 1) [1721858499.002403] <- wl_registry@2.global, (15, Some("zwlr_data_control_manager_v1"), 2) [1721858499.002439] <- wl_registry@2.global, (16, Some("zwlr_export_dmabuf_manager_v1"), 1) [1721858499.002480] <- wl_registry@2.global, (17, Some("zwlr_screencopy_manager_v1"), 3) [1721858499.002517] <- wl_registry@2.global, (18, Some("zwlr_foreign_toplevel_manager_v1"), 3) [1721858499.002554] <- wl_registry@2.global, (19, Some("wl_drm"), 2) [1721858499.002605] <- wl_registry@2.global, (20, Some("zwp_linux_dmabuf_v1"), 4) [1721858499.002651] <- wl_registry@2.global, (22, Some("wp_presentation"), 1) [1721858499.002687] <- wl_registry@2.global, (23, Some("zxdg_output_manager_v1"), 3) [1721858499.002724] <- wl_registry@2.global, (24, Some("zwlr_output_manager_v1"), 4) [1721858499.002769] <- wl_registry@2.global, (25, Some("zwlr_output_power_manager_v1"), 1) [1721858499.002806] <- wl_registry@2.global, (26, Some("zwlr_gamma_control_manager_v1"), 1) [1721858499.002844] <- wl_registry@2.global, (27, Some("ext_idle_notifier_v1"), 1) [1721858499.002881] <- wl_registry@2.global, (28, Some("zwp_relative_pointer_manager_v1"), 1) [1721858499.002919] <- wl_registry@2.global, (29, Some("zwp_pointer_gestures_v1"), 3) [1721858499.002956] <- wl_registry@2.global, (30, Some("zwlr_virtual_pointer_manager_v1"), 2) [1721858499.002993] <- wl_registry@2.global, (31, Some("zwp_virtual_keyboard_manager_v1"), 1) [1721858499.003030] <- wl_registry@2.global, (32, Some("zwp_pointer_constraints_v1"), 1) [1721858499.003066] <- wl_registry@2.global, (33, Some("zwp_input_method_manager_v2"), 1) [1721858499.003102] <- wl_registry@2.global, (34, Some("zwp_text_input_manager_v3"), 1) [1721858499.003139] <- wl_registry@2.global, (35, Some("zwp_tablet_manager_v2"), 1) [1721858499.003177] <- wl_registry@2.global, (36, Some("wl_seat"), 9) [1721858499.003214] <- wl_registry@2.global, (37, Some("zriver_control_v1"), 1) [1721858499.003252] <- wl_registry@2.global, (38, Some("zriver_status_manager_v1"), 4) [1721858499.003289] <- wl_registry@2.global, (39, Some("river_layout_manager_v3"), 2) [1721858499.003326] <- wl_registry@2.global, (40, Some("zwp_idle_inhibit_manager_v1"), 1) [1721858499.003362] <- wl_registry@2.global, (41, Some("ext_session_lock_manager_v1"), 1) [1721858499.003401] <- wl_registry@2.global, (42, Some("wl_output"), 4) [1721858499.003438] <- wl_callback@3.done, (3060) [1721858499.003465] <- wl_display@1.delete_id, (3) [1721858499.003535] -> wl_registry@2.bind (3, Some("wl_shm"), 1, wl_shm@3) [1721858499.003583] -> wl_registry@2.bind (17, Some("zwlr_screencopy_manager_v1"), 3, zwlr_screencopy_manager_v1@4) [1721858499.003625] -> wl_registry@2.bind (5, Some("wp_viewporter"), 1, wp_viewporter@5) [1721858499.003667] -> wl_registry@2.bind (36, Some("wl_seat"), 7, wl_seat@6) [1721858499.003710] -> wl_registry@2.bind (13, Some("wl_data_device_manager"), 3, wl_data_device_manager@7) [1721858499.003859] -> wl_registry@2.bind (4, Some("wp_single_pixel_buffer_manager_v1"), 1, wp_single_pixel_buffer_manager_v1@8) [1721858499.003955] -> wl_registry@2.bind (11, Some("zwlr_layer_shell_v1"), 4, zwlr_layer_shell_v1@9) [1721858499.004044] -> wl_registry@2.bind (7, Some("wl_subcompositor"), 1, wl_subcompositor@10) [1721858499.004136] -> wl_registry@2.bind (1, Some("wl_compositor"), 4, wl_compositor@11) [1721858499.004225] -> wl_compositor@11.create_surface (wl_surface@12) [1721858499.004274] -> wl_compositor@11.create_surface (wl_surface@13) [1721858499.004343] -> wl_compositor@11.create_surface (wl_surface@14) [1721858499.004400] -> wl_registry@2.bind (6, Some("wp_fractional_scale_manager_v1"), 1, wp_fractional_scale_manager_v1@15) [1721858499.004491] -> wp_fractional_scale_manager_v1@15.get_fractional_scale (wp_fractional_scale_v1@16, wl_surface@13) [1721858499.004562] -> wl_subcompositor@10.get_subsurface (wl_subsurface@17, wl_surface@14, wl_surface@13) [1721858499.004655] -> zwlr_layer_shell_v1@9.get_layer_surface (zwlr_layer_surface_v1@18, wl_surface@12, <anonymous>@0, 0, Some("shotman")) [1721858499.004766] -> zwlr_layer_shell_v1@9.get_layer_surface (zwlr_layer_surface_v1@19, wl_surface@13, <anonymous>@0, 3, Some("shotman")) [1721858499.004880] -> zwlr_layer_surface_v1@19.set_anchor (5) [1721858499.004940] -> zwlr_layer_surface_v1@19.set_keyboard_interactivity (0) [1721858499.004987] -> zwlr_layer_surface_v1@18.set_size (1, 1) [1721858499.005058] -> wl_surface@12.commit () [1721858499.005283] -> wp_viewporter@5.get_viewport (wp_viewport@20, wl_surface@13) [1721858499.005353] -> wp_viewporter@5.get_viewport (wp_viewport@21, wl_surface@14) [1721858499.005425] -> wp_single_pixel_buffer_manager_v1@8.create_u32_rgba_buffer (wl_buffer@22, 0, 0, 0, 0) [1721858499.005515] -> wl_surface@12.attach (wl_buffer@22, 0, 0) [1721858499.005592] -> wl_registry@2.bind (42, Some("wl_output"), 4, wl_output@23) DEBUG [sctk] Bound new global [42] wl_output v4 [1721858499.005698] -> wl_registry@2.bind (23, Some("zxdg_output_manager_v1"), 3, zxdg_output_manager_v1@24) DEBUG [sctk] Bound new global [23] zxdg_output_manager_v1 v3 [1721858499.005841] -> zxdg_output_manager_v1@24.get_xdg_output (zxdg_output_v1@25, wl_output@23) [1721858499.007185] <- wl_shm@3.format, (0) [1721858499.007227] <- wl_shm@3.format, (1) [1721858499.007255] <- wl_shm@3.format, (875709016) [1721858499.007289] <- wl_shm@3.format, (875708993) [1721858499.007311] <- wl_shm@3.format, (875710274) [1721858499.007335] <- wl_shm@3.format, (842094674) [1721858499.007361] <- wl_shm@3.format, (842088786) [1721858499.007393] <- wl_shm@3.format, (892426322) [1721858499.007418] <- wl_shm@3.format, (892420434) [1721858499.007442] <- wl_shm@3.format, (909199186) [1721858499.007468] <- wl_shm@3.format, (808665688) [1721858499.007490] <- wl_shm@3.format, (808665665) [1721858499.007513] <- wl_shm@3.format, (1211384408) [1721858499.007536] <- wl_shm@3.format, (1211384385) [1721858499.007563] <- wl_shm@3.format, (942948952) [1721858499.007589] <- wl_shm@3.format, (942948929) [1721858499.007616] <- wl_seat@6.name, (Some("default")) [1721858499.007689] <- wl_seat@6.capabilities, (3) [1721858499.007714] <- zwlr_layer_surface_v1@18.configure, (3063, 1, 1) [1721858499.007756] <- zwlr_layer_surface_v1@19.configure, (3064, 1366, 746) [1721858499.007867] <- wl_output@23.geometry, (0, 0, 340, 190, 0, Some("BOE"), Some("0x0704"), 0) [1721858499.007980] <- wl_output@23.mode, (1, 1366, 768, 60059) [1721858499.008041] <- wl_output@23.scale, (1) [1721858499.008086] <- wl_output@23.name, (Some("eDP-1")) [1721858499.008141] <- wl_output@23.description, (Some("BOE 0x0704 (eDP-1)")) [1721858499.008198] <- wl_output@23.done, () [1721858499.008240] <- zxdg_output_v1@25.name, (Some("eDP-1")) [1721858499.008298] <- zxdg_output_v1@25.description, (Some("BOE 0x0704 (eDP-1)")) [1721858499.008354] <- zxdg_output_v1@25.logical_position, (0, 0) [1721858499.008395] <- zxdg_output_v1@25.logical_size, (1366, 768) [1721858499.008448] <- wl_output@23.done, () [1721858499.020739] -> wl_seat@6.get_keyboard (wl_keyboard@26) [1721858499.020812] -> wl_seat@6.get_pointer (wl_pointer@27) [1721858499.020881] -> zwlr_layer_surface_v1@18.ack_configure (3063) [1721858499.020933] -> wl_surface@12.commit () [1721858499.020950] -> zwlr_layer_surface_v1@19.ack_configure (3064) DEBUG [shotman] Configuring (and rendering) main window thread 'main' panicked at src/main.rs:1129:22: error handling configure event: no buffer_info for screenshot note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Unlike the other replies here, I can be 100% sure that I'm running version 0.4.6. Hope that helps.
I see that the compositor sends two configure events:
[1721858499.007714] <- zwlr_layer_surface_v1@18.configure, (3063, 1, 1) [1721858499.007756] <- zwlr_layer_surface_v1@19.configure, (3064, 1366, 746)
But shotman only ever configures a single surface:
wl_surface@12.commit ()
From
wlr-layer-shell-unstable-v1.xml
:After creating a layer_surface object and setting it up, the client must perform an initial commit without any buffer attached. The compositor will reply with a layer_surface.configure event. The client must acknowledge it and is then allowed to attach a buffer to map the surface.
The moment that shotman receives the configure event for the second surface, everything starts to mess up; it's receiving a reply to an event that it hasn't emitted yet, and tries to calculate window size with data that it doesn't have yet.
This sounds like a compositor bug.
What I reported here was indeed a bug in the river compositor. I opened an issue there and a fix was just merged here: https://codeberg.org/river/river/commit/93863b132eb7a32e296d5f224181b04e161b1c58
Of course, I'm not OP in this issue and this doesn't affect what was reported by the other participants in this thread, who are using Hyprland instead of river.
Thanks for confirming.
Hyprland behaves the same as river before the above fix. Also compositor bug.