[cairo-bugs] [Bug 12995] Wireshark crashes with BadMatch
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 30 19:21:40 PDT 2007
http://bugs.freedesktop.org/show_bug.cgi?id=12995
------- Comment #3 from guy at alum.mit.edu 2007-10-30 19:26 PST -------
Oh, my goodness.
At the end of _cairo_xlib_surface_create_internal(), I added some fprintfs:
if (foo != NULL) {
fprintf(foo, "surface %p, dpy %p, drawable 0x%08lx, xrender_format
%p\n",
surface, surface->dpy, surface->drawable,
surface->xrender_format);
fclose(foo);
}
and it printed
surface 0x69d1af0, dpy 0x480fe00, drawable 0x0020023e, xrender_format
0x48114e0
In _cairo_xlib_surface_ensure_dst_picture(), I added some fprintfs:
FILE *foo;
if (!surface->dst_picture) {
foo = fopen("/tmp/gtklog", "a");
if (foo != NULL) {
Window root;
int x, y;
unsigned int xwidth, xheight, border_width, depth;
fprintf(foo, "ensure_dst_picture: surface %p, dpy %p, drawable
0x%08lx, xrender_format %p\n",
surface, surface->dpy, surface->drawable,
surface->xrender_format);
if (XGetGeometry(surface->dpy, surface->drawable,
&root, &x, &y, &xwidth, &xheight, &border_width,
&depth))
fprintf(foo, "ensure_dst_picture: drawable depth %u\n", depth);
fprintf(foo, "ensure_dst_picture: surface %p\n", surface);
if (surface->xrender_format)
fprintf(foo, "ensure_dst_picture: xrender_format depth %d\n",
surface->xrender_format->depth);
fclose(foo);
}
surface->dst_picture = XRenderCreatePicture (surface->dpy,
surface->drawable,
surface->xrender_format,
0, NULL);
_cairo_xlib_surface_set_picture_clip_rects (surface);
} else if (surface->clip_dirty & CAIRO_XLIB_SURFACE_CLIP_DIRTY_PICTURE)
_cairo_xlib_surface_set_picture_clip_rects (surface);
and it printed
ensure_dst_picture: surface 0x69d1af0, dpy 0x480fe00, drawable 0x0020023e,
xrender_format 0x48114e0
ensure_dst_picture: drawable depth 24
ensure_dst_picture: xrender_format depth 24
In the X server, I put in code to log information when the CreatePicture op
failed, and it printed
ProcRenderCreatePicture: BadMatch due to pformat(id 0x0000002c, format
0x00020888)->depth (24) != pDrawable(id 0x0020023e)->depth (32)
so I see a bit of a disagreement between Cairo and the X server about the depth
of the drawable.
Am I missing something?
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list