Panics during Window serialization can kill listener threads #48

Closed
opened 2026-01-05 14:47:55 +01:00 by adam · 0 comments
Owner

Originally created by @LGUG2Z on GitHub (Oct 26, 2021).

Originally assigned to: @LGUG2Z on GitHub.

6ae59671a2/komorebi/src/window.rs (L59)

The current Serialize implementation for Window is full of expect calls which will panic on the running thread if ever encountered. I have encountered a few of these in the last few days when running at more verbose logging levels.

These should be replaced with calls to serde::ser::Error::custom to return a Result so that serialization errors can be handled gracefully without requiring a full restart of the application following a panic on a listener thread.

Originally created by @LGUG2Z on GitHub (Oct 26, 2021). Originally assigned to: @LGUG2Z on GitHub. https://github.com/LGUG2Z/komorebi/blob/6ae59671a2c100dfd75e00ec19606a46b1faa929/komorebi/src/window.rs#L59 The current `Serialize` implementation for Window is full of `expect` calls which will panic on the running thread if ever encountered. I have encountered a few of these in the last few days when running at more verbose logging levels. These should be replaced with calls to [`serde::ser::Error::custom`](https://docs.serde.rs/serde/ser/trait.Error.html#tymethod.custom) to return a `Result` so that serialization errors can be handled gracefully without requiring a full restart of the application following a panic on a listener thread.
adam added the bug label 2026-01-05 14:47:55 +01:00
adam closed this issue 2026-01-05 14:47:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#48