After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781704 - mutter crashes when launching xterm from a 16-bit color depth remote session
mutter crashes when launching xterm from a 16-bit color depth remote session
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
3.20.x
Other Linux
: Normal critical
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-04-25 10:49 UTC by Vasilis Liaskovitis
Modified: 2021-07-05 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-shell backtrace due to mutter assertion failure (3.47 KB, text/plain)
2017-04-25 10:49 UTC, Vasilis Liaskovitis
  Details
iconcache: Support RGB16_565 format (1.90 KB, patch)
2017-05-10 13:33 UTC, Vasilis Liaskovitis
none Details | Review

Description Vasilis Liaskovitis 2017-04-25 10:49:35 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
Comment 1 Felix Zhang 2017-04-28 12:35:12 UTC
Bug report on RedHat bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1239129
Comment 2 Felix Zhang 2017-04-28 12:52:34 UTC
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
Comment 3 Vasilis Liaskovitis 2017-05-10 13:33:15 UTC
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.
Comment 4 Vasilis Liaskovitis 2017-05-17 14:47:43 UTC
Any feedback / suggestions for this patch?
Comment 5 GNOME Infrastructure Team 2021-07-05 13:45:10 UTC
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.