Skip to content

Conversation

Caellian
Copy link
Collaborator

@Caellian Caellian commented May 7, 2025

I created seat listener object within init function which freed it once the function call was done. As the data was tiny (two bytes), it was very unlikely it'd be overwritten without another tiny heap allocation. They probably ended up on the heap because a pointer to them is passed to wayland-client so C++ couldn't stack-allocate them.

So the general rule for listeners is that they must be static - I thought Wayland would just copy them as they're trivial and small, but I guess not.

Add some minor additional safety checks to wayland main_loop_wait. These come from kitty code - added them while debugging, but they make the code more robust so I kept them.

Closes #1791

Add some minor additional safety checks to wayland main_loop_wait. These
come from kitty code - added them while debugging, but they make the
code more robust so I kept them.

Signed-off-by: Tin Švagelj <[email protected]>
@github-actions github-actions bot added sources PR modifies project sources display: wayland related to Wayland backend labels May 7, 2025
@Caellian Caellian added bug related to incorrect existing implementation of some functionality mouse events related to mouse event handling and removed sources PR modifies project sources labels May 7, 2025
@Caellian Caellian requested a review from brndnmtthws May 7, 2025 03:35
Copy link

netlify bot commented May 7, 2025

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 748c65b
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/681ad4e7c824560008027c0e

@Caellian Caellian added the sources PR modifies project sources label May 7, 2025
@Caellian Caellian merged commit 0c40ad9 into main May 11, 2025
29 checks passed
@Caellian Caellian deleted the fix/seat-segfault branch May 11, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug related to incorrect existing implementation of some functionality display: wayland related to Wayland backend mouse events related to mouse event handling sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Random segfaults
2 participants