GDK calling _exit on wayland errors makes errors uncatchable by host applications.
See for example https://bugzilla.mozilla.org/show_bug.cgi?id=1743144, where Firefox is hitting one of these _exit
conditions in Wayland, and that makes us blind to this kind of crashes.
Some potentially-relevant context is in 31c036b9 / https://bugzilla.gnome.org/show_bug.cgi?id=646338 (which I presume is why the Wayland code is using _exit
too). But I'm not sure if the same constraints apply to Wayland as they do to X11.
Is there any chance code like gdkeventsource.c
and so on could use exit()
rather than _exit
? Perhaps raising a signal would be better? Perhaps some GTK-specific hook could be provided so that we can catch them and get a crash report?
If none of those options is workable this might be WONTFIX, though that's a somewhat unfortunate outcome because that means we're blind to these crashes until some developer or sufficiently-expert user hits it and digs enough to figure out what's going on.
cc @debarshir who tweaked some of these (425e4df1 / 385a46b5)
I guess looking at the later it's sorta intended that this uses _exit
, but when the connection is closed due to a different issue that doesn't involve the server going away it'd be nice to be able to catch it... Maybe at least the Lost connection to Wayland compositor.
could use exit()
?