wmww / gtk4-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4
MIT License
128 stars 4 forks source link

Remove proxies from libwayland list when destroying them #27

Closed wmww closed 10 months ago

wmww commented 10 months ago

I believe this fixes #24 (though I was unable to reproduce it). It definitely fixes crashes I was getting messing with the tests.

proxy->queue_link was not being removed from libwayland's list, and so libwayland was accessing the freed memory later when new members were added or removed from the list. Annoyingly instead of segfaulting there, the pattern seems to be that a new allocation has already been made in GTK on the same memory, and it only crashes once GTK tries to use the trampled structure. Don't ask me how long it took me in rr to figure that out.