Unexpected X error (BadDrawable) causing metacity to abort in maverick

Bug #584287 reported by Lorenzo Zoffoli on 2010-05-22
70
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Metacity
Invalid
Undecided
Unassigned
gtk+2.0 (Ubuntu)
Undecided
Unassigned
metacity (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: metacity

Opening firefox make metacity crash with following error printed:

Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Bug in window manager: Unexpected X error: BadDrawable (invalid Pixmap or Window parameter) serial 12903 error_code 9 request_code 53 minor_code 0)
Aborted

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: metacity 1:2.30.1-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.34-3.10-generic 2.6.34
Uname: Linux 2.6.34-3-generic x86_64
Architecture: amd64
Date: Sat May 22 19:24:12 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: metacity

Related branches

Ruben Verweij (ruben-verweij) wrote :

I can confirm this bug on maverick with the same error messages. I am using the nouveau driver.

Changed in metacity (Ubuntu):
status: New → Confirmed
Fabien Tassin (fta) wrote :

same here, maverick 32bit, nvidia-current.
happens with a simple xterm.

I forgot to say that I use nouveau driver with gallium 3d acceleration from xorg-edgers PPA

The same happens even launching a script with Geany IDE.

Ruben Verweij (ruben-verweij) wrote :

I am getting a slightly different error with Thunderbird, however:
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Bug in window manager: Unexpected X error: BadDrawable (invalid Pixmap or Window parameter) serial 12903 error_code 9 request_code 53 minor_code 0)
Aborted

Fabien Tassin (fta) on 2010-05-23
summary: - firefox make metacity crash
+ Unexpected X error (BadDrawable) causing metacity to abort in maverick
Martin Erik Werner (arand) wrote :

Also happens when launching OpenOffice.
Here using virtualbox (with ose-guest-utils).
I would venture a guess that this is not hardware/driver-related.

Martin Erik Werner (arand) wrote :

Here is a backtrace with debugsymbols installed, if that might be of any use (do hint if I'm doing things horribly wrong, I have little experience with gdb).

Fabien Tassin (fta) wrote :

@bratsche: like for bug 584959, dropping debian/patches/064_client_side_decoration.patch from gtk fixes this issue.

Fabien Tassin (fta) wrote :

@bratsche: patch calling gdk_screen_get_system_colormap() instead of gdk_screen_get_default_colormap() as you suggested.
Fixes the issue (with a gtk *with* debian/patches/064_client_side_decoration.patch)

How do I apply that patch?

Fabien Tassin (fta) wrote :

@zoff: It's there: https://edge.launchpad.net/~fta/+archive/sandbox/+packages
but don't add this PPA to your system, it's my playground and is not meant to be stable.
(so just cherry pick the metacity debs for you arch from that page)

Thanks. But I would be interessed in learn how to apply that patch.
I used apt-get source to take source from repos but I can't apply it.

Martin Erik Werner (arand) wrote :

@zoff:
Read https://wiki.ubuntu.com/PackagingGuide/Complete

Is this debdiff of any use?
Is this being addressed upstream?
Should it be brought upstream?
...

Fabien Tassin (fta) on 2010-05-27
tags: added: gtk-csd
tags: added: patch
Gary Trakhman (gary-trakhman) wrote :

happens for me with xserver-xorg-video-intel from xorg-edgers on maverick when loading Urban Terror opengl game.

Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Window manager warning: Log level 8: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
Window manager warning: Log level 8: meta_frame_style_draw_with_style: assertion `style_gtk->colormap == gdk_drawable_get_colormap (drawable)' failed
Bug in window manager: Unexpected X error: BadDrawable (invalid Pixmap or Window parameter) serial 5943 error_code 9 request_code 53 minor_code 0)
Aborted

Felix Yan (felixonmars) wrote :

Same problem here, and Fabien Tassin's package solved it.

Id2ndR (id2ndr) wrote :

metacity and metacity-common 1:2.30.1-0ubuntu1+fta2 fix the problem for me too. I'm using xorg-egers PPA for Gallium3D with Intel GPU.

Fabio Marconi (fabiomarconi) wrote :

New metacity package today uploaded don't fix for me, the only working is
metacity_2.30.1-0ubuntu1+fta2_amd64.deb

tags: added: iso-testing
Jean-Louis Dupond (dupondje) wrote :

This seems to be caused by client side decoration patch.

That patch has the following change:
+--- a/gdk/x11/gdkscreen-x11.c
++++ b/gdk/x11/gdkscreen-x11.c
+@@ -241,9 +241,29 @@ gdk_screen_get_root_window (GdkScreen *screen)
+ GdkColormap *
+ gdk_screen_get_default_colormap (GdkScreen *screen)
+ {
++ GdkScreenX11 *screen_x11;
++ GdkColormap *colormap;
++
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+- return GDK_SCREEN_X11 (screen)->default_colormap;
++ screen_x11 = GDK_SCREEN_X11 (screen);
++
++ if (!screen_x11->default_colormap)
++ {
++ if (!screen_x11->rgba_visual)
++ {
++ colormap = g_object_ref (gdk_screen_get_system_colormap (screen));
++ }
++ else
++ {
++ colormap = gdk_colormap_new (screen_x11->rgba_visual,
++ FALSE);
++ }
++
++ screen_x11->default_colormap = colormap;
++ }
++
++ return screen_x11->default_colormap;
+ }
+
+ /**

This function is called but metacity, and there it crashes. When we patch metacity to call gdk_screen_get_system_colormap, it doesn't crash (that whats the patch of the ppa package of Fabien does).

So it looks like the bug isn't really a metacity bug, but more a gtk+2.0 bug.

I compiled gtk+2.0 without the client side decoration patch, and then metacity doesn't have any issue!

Cody Russell (bratsche) wrote :

Can we get this patch applied? For some reason we have users who are now "solving" the problem by rebuilding gtk+ without the client-side-decorations patch rather than applying the actual fix patch.

The patch Fabien posted in comment #10 is the correct solution. I asked him on irc to test this out and he said it worked, so he posted the patch.

Changed in metacity (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:2.30.1-1ubuntu2

---------------
metacity (1:2.30.1-1ubuntu2) maverick; urgency=low

  * debian/patches/14_wrong_colormap.patch:
    - Use correct colormap, causes crash with client side decorations. Patch
      from Fabien Tassin (LP: #584287)
 -- Robert Ancell <email address hidden> Wed, 02 Jun 2010 09:49:43 +1000

Changed in metacity (Ubuntu):
status: Triaged → Fix Released
Omer Akram (om26er) wrote :

not a bug in gtk its the app that have to adapt

Changed in gtk+2.0 (Ubuntu):
status: New → Invalid
Changed in metacity:
status: Unknown → New
Changed in metacity:
importance: Unknown → High
dino99 (9d9) wrote :

EOL reached on that serie https://wiki.ubuntu.com/Releases

Changed in metacity:
importance: High → Undecided
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.