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

Bug #584287 reported by Lorenzo Zoffoli
70
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Metacity
Invalid
Undecided
Unassigned
gtk+2.0 (Ubuntu)
Invalid
Undecided
Unassigned
metacity (Ubuntu)
Fix Released
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

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :
Revision history for this message
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
Revision history for this message
Fabien Tassin (fta) wrote :

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

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

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

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

The same happens even launching a script with Geany IDE.

Revision history for this message
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)
summary: - firefox make metacity crash
+ Unexpected X error (BadDrawable) causing metacity to abort in maverick
Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
Fabien Tassin (fta) wrote :

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

Revision history for this message
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)

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

How do I apply that patch?

Revision history for this message
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)

Revision history for this message
Lorenzo Zoffoli (lorenzo-zoffoli) wrote :

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.

Revision history for this message
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)
tags: added: gtk-csd
tags: added: patch
Revision history for this message
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

Revision history for this message
Felix Yan (felixonmars) wrote :

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

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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!

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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  
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.