Bug 574500

Summary: BadMatch from XCreateWindow (different color depths)
Product: [Fedora] Fedora Reporter: chuck elliot <chuck.elliot>
Component: desktop-effectsAssignee: Owen Taylor <otaylor>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: adel.gadllah, didierg-divers, eddie, gabriel, jlaska, loverboy76, maycon.franca, moose, odeys87, otaylor, rianby64, sghosh, stuart, vmattaur, xseanxbutlerx, yuseffathi
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:24fc7c778c10fc51d2e444793d550cbaf331a9a3
Fixed In Version: desktop-effects-0.8.7-2.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-07 17:48:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace none

Description chuck elliot 2010-03-17 16:58:42 UTC
abrt 1.0.8 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: desktop-effects
component: desktop-effects
executable: /usr/bin/desktop-effects
kernel: 2.6.32.9-70.fc12.i686
package: desktop-effects-0.8.4-2.fc12
rating: 4
reason: Process /usr/bin/desktop-effects was killed by signal 6 (SIGABRT)
release: Fedora release 12 (Constantine)

How to reproduce
-----
1. start it.
2.
3.

Comment 1 chuck elliot 2010-03-17 16:58:44 UTC
Created attachment 400829 [details]
File: backtrace

Comment 2 odeys87 2010-03-26 21:53:48 UTC

How to reproduce
-----
1.Power on Fedora12
2.Login to default non root account
3.Tried to open System-> Desktop Effects and it crashed without opening


Comment
-----
Could not open desktop effects, for some reason it is not opening at all.I am running Fedora12 on a virtual machine VMWare.

odeys87

Comment 3 Karel Klíč 2010-05-25 08:36:36 UTC
*** Bug 583870 has been marked as a duplicate of this bug. ***

Comment 4 Karel Klíč 2010-05-25 08:36:40 UTC
*** Bug 588208 has been marked as a duplicate of this bug. ***

Comment 5 Karel Klíč 2010-05-25 08:36:44 UTC
*** Bug 588607 has been marked as a duplicate of this bug. ***

Comment 6 Karel Klíč 2010-05-25 08:36:48 UTC
*** Bug 593582 has been marked as a duplicate of this bug. ***

Comment 7 Owen Taylor 2010-06-23 01:32:43 UTC
Error event:

xerror = {type = 0, display = 0x9169600, resourceid = 231, serial = 
    129, error_code = 8 '\b', request_code = 1 '\001', minor_code = 
    0 '\000'}

request code  1 is CreateWindow.

Comment 8 Owen Taylor 2010-06-23 01:51:38 UTC
*** Bug 590943 has been marked as a duplicate of this bug. ***

Comment 9 Owen Taylor 2010-06-23 01:54:06 UTC
*** Bug 596596 has been marked as a duplicate of this bug. ***

Comment 10 Owen Taylor 2010-06-23 02:31:22 UTC
*** Bug 583311 has been marked as a duplicate of this bug. ***

Comment 11 Owen Taylor 2010-06-23 02:31:38 UTC
*** Bug 589460 has been marked as a duplicate of this bug. ***

Comment 12 Owen Taylor 2010-06-23 02:32:06 UTC
*** Bug 592715 has been marked as a duplicate of this bug. ***

Comment 13 Owen Taylor 2010-06-23 02:32:33 UTC
*** Bug 597530 has been marked as a duplicate of this bug. ***

Comment 14 Owen Taylor 2010-06-23 02:49:07 UTC
There are at least several references to this being triggered by a 16bpp color dpth - in particular this was tracked down by Stuart Gathman in bug 583311; and in bug 597530 Andres Rios says "Cambiar la resolucion de pantalla de millones de colores a miles de colores" as a reproduction step.

The explanation, I think, of this bug can be seen in the X server code:


    if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) &&
        (class != InputOnly) &&
        (depth != pParent->drawable.depth))
    {
        *error = BadMatch;
        return NullWindow;
    }

So if you don't provide a BorderPixmap or a BorderPixel (meaning that the border color is inherited from the parent), then you have to match the color depth of the parent. We can see a difference between the desktop-effects code:

  cwa.colormap = XCreateColormap(xdisplay, RootWindow (xdisplay, xscreen),
                                 visual->visual, AllocNone);
  window = XCreateWindow(xdisplay,
                         RootWindow (xdisplay, xscreen),
                         0, 0, 1, 1, 0,
                         visual->depth, InputOutput, visual->visual,
                         CWColormap,
                         &cwa);

And the glxinfo code:

   attr.background_pixel = 0;
   attr.border_pixel = 0;
   attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
   attr.event_mask = StructureNotifyMask | ExposureMask;
   mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
   win = XCreateWindow(dpy, root, 0, 0, width, height,
                       0, visinfo->depth, InputOutput,
                       visinfo->visual, mask, &attr);

Looking at the X server code, I can't see the reason for setting the BackPixel and the EventMask, though I think it's probably good to set the BackPixel just to be safe.

Comment 15 Owen Taylor 2010-06-23 02:50:42 UTC
*** Bug 541985 has been marked as a duplicate of this bug. ***

Comment 16 Owen Taylor 2010-06-23 02:52:16 UTC
*** Bug 550983 has been marked as a duplicate of this bug. ***

Comment 17 Fedora Update System 2010-06-23 17:22:51 UTC
desktop-effects-0.8.7-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/desktop-effects-0.8.7-2.fc13

Comment 18 Fedora Update System 2010-06-24 16:35:15 UTC
desktop-effects-0.8.7-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update desktop-effects'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/desktop-effects-0.8.7-2.fc13

Comment 19 James Laska 2010-06-30 14:18:16 UTC
Karel: Are you able to confirm this problem is fixed using the update posted in comment#18?  Please feel free to add feedback either here in bugzilla, or at http://admin.fedoraproject.org/updates/desktop-effects-0.8.7-2.fc13

Thanks!

Comment 20 chuck elliot 2010-06-30 20:16:23 UTC
Seems to be fixed in desktop-effects-0.8.7-2.fc13.x86_64

However, there is no third option 'GNOME3 preview' in the dialogue
as described in rpm -qi



Description :
desktop-effects provides a preference dialog to allow switching the GNOME
desktop between three different window managers: Metacity (the standard
GNOME 2 window manager), Compiz (offering 3D acceleration and special
effects), and GNOME Shell, which offers a preview of the GNOME 3 user
experience.

thanks & best wishes,
CE

Comment 21 Owen Taylor 2010-06-30 20:43:53 UTC
(In reply to comment #20)
> Seems to be fixed in desktop-effects-0.8.7-2.fc13.x86_64
> 
> However, there is no third option 'GNOME3 preview' in the dialogue
> as described in rpm -qi
> 
> Description :
> desktop-effects provides a preference dialog to allow switching the GNOME
> desktop between three different window managers: Metacity (the standard
> GNOME 2 window manager), Compiz (offering 3D acceleration and special
> effects), and GNOME Shell, which offers a preview of the GNOME 3 user
> experience.

You need to install the gnome-shell package in order to get this third option.

Comment 22 Fedora Update System 2010-07-07 17:48:19 UTC
desktop-effects-0.8.7-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.