Supreeeme / xwayland-satellite

Xwayland outside your Wayland
Mozilla Public License 2.0
153 stars 7 forks source link

crash with stacktrace #45

Open shumvgolove opened 1 month ago

shumvgolove commented 1 month ago

Running the Helldivers 2 spawns two windows (the game window and I guess the tray icon), where quickly switching between them results in a crash:

 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > _NET_WM_STATE (Remove) props: Atom { res_id: 290 } Atom { res_id: 0 }
 2024-07-28T20:45:15.691Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [4, 0, 0, 0, 2, 0, 0, 0]
 2024-07-28T20:45:15.691Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 50331649 }: 0x0, 2560x1440
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > reconfiguring window Window { res_id: 50331649 }
 2024-07-28T20:45:15.691Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 50331649 }
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(ClientMessage(ClientMessageEvent { response_type: 161, format: 32, sequence: 653, window: Window { res_id: 50331649 }, r#type: Atom { res_id: 248 }, data: Data32([0, 289, 0, 1, 0]) }))
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > _NET_WM_STATE (Remove) props: Atom { res_id: 289 } Atom { res_id: 0 }
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(PropertyNotify(PropertyNotifyEvent { response_type: 28, pad: 1, sequence: 653, window: Window { res_id: 50331649 }, atom: Atom { res_id: 375 }, time: 580874, state: NewValue, pad: 3 }))
 2024-07-28T20:45:15.691Z DEBUG xwayland_satellite::xstate            > changed property "_NET_WM_BYPASS_COMPOSITOR" for Window { res_id: 50331649 }
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(ConfigureNotify(ConfigureNotifyEvent { response_type: 22, pad: 1, sequence: 654, event: Window { res_id: 1045 }, window: Window { res_id: 50331649 }, above_sibling: Window { res_id: 60817410 }, x: 0, y: 0, width: 2560, height: 1440, border_width: 0, override_redirect: false, pad: 1 }))
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(PropertyNotify(PropertyNotifyEvent { response_type: 28, pad: 1, sequence: 661, window: Window { res_id: 50331649 }, atom: Atom { res_id: 248 }, time: 580875, state: NewValue, pad: 3 }))
 2024-07-28T20:45:15.691Z DEBUG xwayland_satellite::xstate            > changed property "_NET_WM_STATE" for Window { res_id: 50331649 }
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(ConfigureNotify(ConfigureNotifyEvent { response_type: 22, pad: 1, sequence: 672, event: Window { res_id: 1045 }, window: Window { res_id: 50331649 }, above_sibling: Window { res_id: 60817410 }, x: 380, y: 0, width: 2560, height: 1440, border_width: 0, override_redirect: false, pad: 1 }))
 2024-07-28T20:45:15.691Z TRACE xwayland_satellite::xstate            > x11 event: X(ConfigureNotify(ConfigureNotifyEvent { response_type: 22, pad: 1, sequence: 679, event: Window { res_id: 1045 }, window: Window { res_id: 50331649 }, above_sibling: Window { res_id: 60817410 }, x: 0, y: 0, width: 2560, height: 1440, border_width: 0, override_redirect: false, pad: 1 }))
 2024-07-28T20:45:16.343Z TRACE xwayland_satellite::xstate            > x11 event: X(ConfigureNotify(ConfigureNotifyEvent { response_type: 22, pad: 1, sequence: 689, event: Window { res_id: 1045 }, window: Window { res_id: 60817409 }, above_sibling: Window { res_id: 27263107 }, x: 380, y: 0, width: 1800, height: 1440, border_width: 0, override_redirect: true, pad: 1 }))
 2024-07-28T20:45:16.343Z TRACE xwayland_satellite::xstate            > x11 event: X(MapNotify(MapNotifyEvent { response_type: 19, pad: 1, sequence: 689, event: Window { res_id: 1045 }, window: Window { res_id: 60817409 }, override_redirect: true, pad: 3 }))
 2024-07-28T20:45:16.343Z DEBUG xwayland_satellite::xstate            > got title: None
 2024-07-28T20:45:16.343Z DEBUG xwayland_satellite::server            > mapping Window { res_id: 60817409 }
 2024-07-28T20:45:16.369Z TRACE xwayland_satellite::xstate            > x11 event: X(ConfigureRequest(ConfigureRequestEvent { response_type: 23, stack_mode: Above, sequence: 698, parent: Window { res_id: 1045 }, window: Window { res_id: 50331649 }, sibling: Window { res_id: 0 }, x: -32000, y: -32000, width: 160, height: 31, border_width: 0, value_mask: X | Y | WIDTH | HEIGHT }))
 2024-07-28T20:45:16.369Z DEBUG xwayland_satellite::xstate            > Window { res_id: 50331649 } request: X | Y | WIDTH | HEIGHT
thread '<unnamed>' panicked at ./src/lib.rs:91:52:
called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }
stack backtrace:
   0:     0x5bac110681f0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1557845c8e738a27
   1:     0x5bac10f9294b - core::fmt::write::hcc4af7a39f871458
   2:     0x5bac110654f3 - std::io::Write::write_fmt::h2e58768ec339f8e4
   3:     0x5bac11067f6e - std::sys_common::backtrace::print::h3472d9e8ff95a48d
   4:     0x5bac110693fe - std::panicking::default_hook::{{closure}}::hedc6d80425a5f543
   5:     0x5bac110690e6 - std::panicking::default_hook::hfd8eb046669a0df4
   6:     0x5bac11069a0f - std::panicking::rust_panic_with_hook::h65b2a82740c1271c
   7:     0x5bac110697f4 - std::panicking::begin_panic_handler::{{closure}}::h93c97270af2611f9
   8:     0x5bac110686b9 - std::sys_common::backtrace::__rust_end_short_backtrace::h829948e6034c0cd2
   9:     0x5bac11069557 - rust_begin_unwind
  10:     0x5bac10f91243 - core::panicking::panic_fmt::hfc53808b4f190311
  11:     0x5bac10f916e6 - core::result::unwrap_failed::hccb2dcc79e29bd4a
  12:     0x5bac1116b364 - std::sys_common::backtrace::__rust_begin_short_backtrace::h65020462f70c50e7
  13:     0x5bac11172248 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb2f115beaca3d3d4
  14:     0x5bac1106c4bb - std::sys::pal::unix::thread::Thread::new::thread_start::h116c3f3c1780c052
zsh: abort      xwayland-satellite
nekopsykose commented 1 month ago

does this happen on the latest main? there was quite a few bugfixes since the last release and no new release yet

shumvgolove commented 1 month ago

I'll try to reproduce from latest commit.

Supreeeme commented 1 month ago

Were you able to reproduce on latest?

shumvgolove commented 1 month ago

Compiled from https://github.com/Supreeeme/xwayland-satellite/commit/95afa163a60167cd97bf6afa870bc117a1be3d03 commit, can reproduce when somewhat quickly resizing the Steam window:

https://github.com/user-attachments/assets/43f6fde0-4c5d-417a-97fe-66a31ba75c82

Logs:

Io error: Broken pipe (os error 32)
thread 'main' panicked at src/server/mod.rs:826:39:
called `Result::unwrap()` on an `Err` value: Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
stack backtrace:
   0:     0x5ba040675445 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8042c3a085eed623
   1:     0x5ba04069c7db - core::fmt::write::h6c8935ea3c4755c0
   2:     0x5ba04067264f - std::io::Write::write_fmt::hce8a6ca44dabd7d6
   3:     0x5ba04067521e - std::sys_common::backtrace::print::h9f7a34f0f249d7a6
   4:     0x5ba0406768f9 - std::panicking::default_hook::{{closure}}::hefa9f91783e53ceb
   5:     0x5ba04067669a - std::panicking::default_hook::h49e90b40b5c6e867
   6:     0x5ba040676e03 - std::panicking::rust_panic_with_hook::hc30b43e7791e6481
   7:     0x5ba040676ce4 - std::panicking::begin_panic_handler::{{closure}}::h34862f1549c5fcec
   8:     0x5ba040675909 - std::sys_common::backtrace::__rust_end_short_backtrace::h3f97d784ebbc3b5a
   9:     0x5ba040676a17 - rust_begin_unwind
  10:     0x5ba04069ae23 - core::panicking::panic_fmt::h2224eacfefcd3224
  11:     0x5ba04069b2b6 - core::result::unwrap_failed::h259a7416ba54fd9c
  12:     0x5ba0404b3870 - xwayland_satellite::server::ServerState<C>::run::hf625d037780c46b3
  13:     0x5ba0404d1b46 - xwayland_satellite::xstate::XState::handle_events::heab6515a9d372337
  14:     0x5ba0404a11b3 - xwayland_satellite::main::h9941d049bbee9868
  15:     0x5ba04048b0fc - xwayland_satellite::main::h1b0b9dafad8fff89
  16:     0x5ba04049b573 - std::sys_common::backtrace::__rust_begin_short_backtrace::ha1ac82bb404ba341
  17:     0x5ba0404975e9 - std::rt::lang_start::{{closure}}::h07f92df6d84a96e2
  18:     0x5ba04066de20 - std::rt::lang_start_internal::h64931a851202be47
  19:     0x5ba04048b285 - main

I assume it's a Xwayland crash, not necessarily xwayland-satellite?

Supreeeme commented 1 month ago

Hard to tell from just that, could you give the whole log? Also, what compositor is that?

shumvgolove commented 1 month ago

Here's the full log: xwayland-satellite.log

Compositor is niri 0.1.7

Supreeeme commented 3 weeks ago

You're resizing the window via the little thing on the Steam window? I'm curious as to why that is even working, because as far as I know it shouldn't...