GNOME Bugzilla – Bug 781704
mutter crashes when launching xterm from a 16-bit color depth remote session
Last modified: 2021-07-05 13:45:10 UTC
Created attachment 350387 [details] gnome-shell backtrace due to mutter assertion failure Opening xterm on a remote gnome-shell session with 16-bit depth (using vnc or xrdp) causes gnome-shell to exit with an assertion failure in mutter: x11/iconcache.c See attached core dump backtrace. The failing assertion is: static int standard_pict_format_for_depth (int depth) { switch (depth) { case 1: return PictStandardA1; case 24: return PictStandardRGB24; case 32: return PictStandardARGB32; default: g_assert_not_reached (); <- assertion fails } } I assume this can happen with other applications as well, not just xterm, from a session with 16-bit color depth. Is 16-bit depth out of the scope of mutter specification / design? I have not tested master version of mutter, but looking at git master, standard_pict_format_for_depth() still only handles depths 1, 24, 32. Tested with: mutter 3.20.3-14.3 gnome-shell 3.20.4-70.4
Bug report on RedHat bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1239129
If I understand correctly, the currently handled depths are the "standard" PictFormat defined by libXrender, unfortunately RGB16_565 is not one of them. I feel we need to implement support for non-standard picture formats in pict_format_for_depth(), mutter/src/x11/iconcache.c with the help of XRenderFindFormat() of libXrender/src/Xrender.c
Created attachment 351550 [details] [review] iconcache: Support RGB16_565 format This patch adds RGB16_565 format handling. It seems to solve the original issue (xterm no longer crashes), but it looks like a hack. Comments/suggestions for improvement or for a different approach are welcome.
Any feedback / suggestions for this patch?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.