wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Wayfire wsets plugin random crash

Open killown opened this issue 3 months ago • 1 comments

Describe the bug while fuzz-testing waypanel, I encountered this unexpected wayfire crash:

EE 2025-09-18 03:28:13.564 - [xwayland/xwm.c:1920] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 48409, value 4194316
EE 2025-09-18 03:28:13.564 - [xwayland/xwm.c:1920] xcb error: op DeleteProperty (no minor), code Window (no extension), sequence 48410, value 4194316
EE 2025-09-18 03:28:13.564 - [xwayland/xwm.c:1920] xcb error: op DeleteProperty (no minor), code Window (no extension), sequence 48413, value 4194316
EE 2025-09-18 03:28:13.579 - [src/api/wayfire/dassert.hpp:26] Cannot set different output for a view with a parent!
EE 2025-09-18 03:28:13.596 - #1  wf::toplevel_view_interface_t::set_output(wf::output_t*) ??:?
EE 2025-09-18 03:28:13.603 - #2  wayfire_wsets_plugin_t::send_window_to(int, nonstd::observer_ptr<wf::toplevel_view_interface_t>) [clone .isra.0] wsets.cpp:?
EE 2025-09-18 03:28:13.609 - #3  std::_Function_handler<wf::json_t (wf::json_t), wayfire_wsets_plugin_t::send_view_to_wset::{lambda(wf::json_t)#1}>::_M_invoke(std::_Any_data const&, wf::json_t&&) ??:?
EE 2025-09-18 03:28:13.616 - #4  std::_Function_handler<wf::json_t (wf::json_t, wf::ipc::client_interface_t*), wf::ipc::method_repository_t::register_method(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<wf::json_t (wf::json_t)>)::{lambda(wf::json_t const&, wf::ipc::client_interface_t*)#1}>::_M_invoke(std::_Any_data const&, wf::json_t&&, wf::ipc::client_interface_t*&&) ??:?
EE 2025-09-18 03:28:13.623 - #5  wf::ipc::method_repository_t::call_method(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, wf::json_t, wf::ipc::client_interface_t*) ??:?
EE 2025-09-18 03:28:13.629 - #6  wf::ipc::server_t::handle_incoming_message(wf::ipc::client_t*, wf::json_t) ??:?
EE 2025-09-18 03:28:13.636 - #7  wf::ipc::client_t::handle_fd_incoming(unsigned int) ??:?
EE 2025-09-18 03:28:13.642 - #8  wl_loop_handle_ipc_client_fd_event(int, unsigned int, void*) ??:?
EE 2025-09-18 03:28:13.648 - #9  wl_event_loop_dispatch ??:?
EE 2025-09-18 03:28:13.655 - #10 wl_display_run ??:?
EE 2025-09-18 03:28:13.665 - #11 main ??:?
EE 2025-09-18 03:28:13.672 - #12 __libc_init_first ??:?
EE 2025-09-18 03:28:13.680 - #13 __libc_start_main ??:?
EE 2025-09-18 03:28:13.690 - #14 _start ??:?
(EE) failed to write to Xwayland fd: Broken pipe

Wayfire version 0.11.0-a0e2b4f4 (Sep 17 2025) branch fix-scale-refocus wlroots-0.19.0

killown avatar Sep 18 '25 06:09 killown

The error means that wsets tries to move a dialog to another wset. But we can only move the parent view, not the dialogs. The simplest fix is to check whether the view's parent is not NULL in the send_view_to_wset method handler, and if it has a parent, then send an error to the IPC client.

ammen99 avatar Sep 25 '25 11:09 ammen99