Bug 3925 - BadDrawable by xorgcfg on x86_64 caused by unexplainable weird values in the toplevel struct
Summary: BadDrawable by xorgcfg on x86_64 caused by unexplainable weird values in the ...
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xorgcfg (show other bugs)
Version: 6.8.99.15
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 05:20 UTC by Georgi Georgiev
Modified: 2009-09-01 07:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Georgi Georgiev 2005-07-31 05:20:29 UTC
xorgcfg has been failing on xorg 6.8.2 and 6.8.99.15 with the same message:

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  53 (X_CreatePixmap)
  Resource id in failed request:  0x0
  Serial number of failed request:  981
  Current serial number in output stream:  982

I dived in my compiled xorg tree and recompiled the appropriate stuff with
debugging enabled. Here is some a gdb session for illustration:

Note: I stuck a "XSynchronize(XtDisplay(toplevel), TRUE);" after the
initialization of toplevel.

$ gdb xorgcfg
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) break 434
Breakpoint 1 at 0x4289b6: file interface.c, line 434.
(gdb) run 
Starting program:
/var/tmp/portage/xorg-x11-6.8.99.15/work/xc/programs/Xserver/hw/xfree86/xf86cfg/xorgcfg


Breakpoint 1, main (argc=1, argv=0x7fffffc12ec8) at interface.c:435
435         XtRealizeWidget(toplevel);
(gdb) n
436         XtRealizeWidget(topMenu);
(gdb) p *(toplevel)
$1 = {core = {self = 0x5edc90, widget_class = 0x2aaaab413e00, parent = 0x0,
xrm_name = 167, being_destroyed = 0 '\0', 
    destroy_callbacks = 0x5da180, constraints = 0x0, x = 0, y = 0, width = 320,
height = 343, border_width = 1, 
    managed = 0 '\0', sensitive = 1 '\001', ancestor_sensitive = 1 '\001',
event_table = 0x5bfba0, tm = {
      translations = 0x5ee4e0, proc_table = 0x5ee4a0, current_state = 0x0,
lastEventTime = 0}, accelerators = 0x0, 
    border_pixel = 0, border_pixmap = 2, popup_list = 0x0, num_popups = 0, name
= 0x5a9880 "xorgcfg", screen = 0x5b2500, 
    colormap = 32, window = 0, depth = 35651765, background_pixel = 24,
background_pixmap = 16777215, visible = 0 '\0', 
    mapped_when_managed = 0 '\0'}}
(gdb) p *(toplevel->core.screen)
$2 = {ext_data = 0x0, display = 0x5ad570, root = 72, width = 0, height = 1600,
mwidth = 1200, mheight = 383, ndepths = 288, 
  depths = 0x7, root_depth = 5973392, root_visual = 0x18, default_gc = 0x5b2610,
cmap = 5955920, white_pixel = 32, 
  black_pixel = 16777215, max_maps = 0, min_maps = 0, backing_store = 1,
save_unders = 1, root_input_mask = 0}
(gdb) n
438         pixmap = XCreateBitmapFromData(XtDisplay(toplevel), XtWindow(toplevel),
(gdb) 
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  53 (X_CreatePixmap)
  Resource id in failed request:  0x0
  Serial number of failed request:  983
  Current serial number in output stream:  984

Program exited with code 01.
(gdb) q



Some points I'd like to make:

- the following values (excerpted and given in their order in the structure)

toplevel->core.screen->width = 0
toplevel->core.screen->height = 1600
toplevel->core.screen->mwidth = 1200
toplevel->core.screen->mheigth = 383

toplevel->core.screen->white_pixel = 32
toplevel->core.screen->black_pixel = 16777215
toplevel->core.screen->max_maps = 0

My desktop is running at 1600x1200 24bit color, but the width/height have
obviously shifted one element lower. same goes for the values of white_pixel and
black_pixel that seem to be assigned to the following element in the struct.

toplevel->core.window = 0
toplevel->core.depth = 35651765
toplevel->core.background_pixel = 24
toplevel->core.background_pixmap = 16777215

core.window should definitely not be 0 after a XtRealize (hence the error),
my *color depth* is 24 bits and that 0xFFFFFF seems like a likely value for
background_pixel and not a background_pixmap

Trying the same in a VNC desktop running at 1024x768 16bit color, I get similar
results for the members of toplevel->core.screen:

width = 0
height = 1024
mwidth = 768
mheight = 260
...
white_pixel = 33
black_pixel = 65535
max_maps = 0

My gcc is 3.4.3 -- the stable version distributed with Gentoo. Architecture is
x86_64. Not sure what else you may need to know.
Comment 1 Daniel Stone 2007-02-27 01:27:31 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Alan Coopersmith 2009-09-01 07:31:00 UTC
xorgcfg has been fixed by deletion from Xorg 1.6 & later.


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.