Bug 3909 - X error received while running gnome-about
Summary: X error received while running gnome-about
Alias: None
Product: cairo
Classification: Unclassified
Component: xlib backend (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Reported: 2005-07-29 21:05 UTC by Carlos Garnacho Parro
Modified: 2006-07-27 12:52 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Carlos Garnacho Parro 2005-07-29 21:05:57 UTC

while testing GNOME Bug #311299 Owen's patch, I got the next X error:

Gdk-ERROR **: The program 'gnome-about' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadGlyphSet (invalid GlyphSet parameter)'.
  (Details: serial 1349707 error_code 186 request_code 159 minor_code 22)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

There's a somewhat useful backtrace in comment #20 from that bug. I also tried
Owen's suggestion from comment #22, but managed to get the error later again
Comment 1 Carlos Garnacho Parro 2005-08-03 03:50:57 UTC
under request of Owen in IRC, here's what *entry in frame 7 contains:

Breakpoint 1, gdk_x_error (display=0x80641d0, error=0xbfffd340)
    at gdkmain-x11.c:599
599       if (error->error_code)
(gdb) frame 7
#7  0xb7501da0 in _xlib_glyphset_cache_destroy_entry (
    abstract_cache=0x81ddb68, abstract_entry=0x82d1778)
    at cairo-xlib-surface.c:1919
1919        XRenderFreeGlyphs (cache->display, entry->glyphset,
(gdb) print *entry
$1 = {key = {base = {memory = 0, hashcode = 3027655081}, unscaled = 0x82de9a8,
    scale = {xx = 11.333333333333334, yx = 0, xy = 0, yy = 11.333333333333334,
      x0 = 0, y0 = 0}, flags = 16977920, index = 1}, glyphset = 0, glyph = 0}
Comment 2 Owen Taylor 2005-08-03 05:17:53 UTC
In the discussion in that bug, you said that adding a check for glyph != 0 
didn't help, but here glyph is 0. Maybe you could try my suggested patch
Comment 3 Carlos Garnacho Parro 2005-08-05 09:47:49 UTC
Hi Owen,

Maybe there was some kind of glitch in my local copy, sorry. I've retried
gnome-about --sync with the suggested patch, and got a crash at:

0xb7502a0c in _cairo_xlib_surface_show_glyphs32 (scaled_font=0x8281720,
    operator=64, cache=0x6, key=0xbfffe580, src=0x6, self=0x83a3150,
    source_x=6, source_y=6, glyphs=0x840b028, entries=0xbfffd580,
    num_glyphs=20) at cairo-xlib-surface.c:2077
2077            if (!entries[i]->glyph)

My rough guess is that it should be:

                if (!entries[i] || !entries[i]->glyph)

Comment 4 Carlos Garnacho Parro 2005-08-05 09:49:04 UTC
Created attachment 3262 [details] [review]
Add --with-xkb-bindir option, and change default.
Comment 5 Owen Taylor 2005-08-09 07:33:00 UTC
I committed my change:

2005-08-08  Owen Taylor  <otaylor@redhat.com>

        * src/cairo-xlib-surface.c (_xlib_glyphset_cache_destroy_entry):
        Don't free the glyph if the entry doesn't have a glyph.
        (Maybe #3909, Carlos Garnacho Parro)

I don't see how entries[i] could be NULL there. :-(
Comment 6 Carl Worth 2005-08-22 17:14:43 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 7 Carlos Garnacho Parro 2006-07-27 12:52:33 UTC
It's been a long time since it got fixed, I'll close this bug, thanks! :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.