beginner...help?

Peter J. Bismuti peter.j.bismuti at boeing.com
Wed Sep 7 10:48:45 PDT 2005


Day 2, running into problems creating a window using XCreateWindow.  It is 
failing and I haven't been able to pinpoint the cause.  I'm setting _Xdebug = 
1 in the debugger and printing the stack tracke within _XError, but it does 
give consistent results.  Sometimes it crashes within XCreateWindow, other 
times it crashes within XAllocColorCells.   It is said that debuggers are 
unreliable, how can I be certain where the problem is?  Is the X protocol 
error message always correct?   It says that it is a "BadMatch", an error the 
docs say cannot occur in XAllocColorCells.  Once I'm certain that it the 
problem is in XCreateWindow, what next? Trial-and-error doesn't seem to be 
working.  Any help would be appreciated.

Also, if anyone has a simple "hello world" program that uses a DirectColor 
visual,  I would appreciate it if you could send it to me.    

Thanks.

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  9
  Current serial number in output stream:  10



(First run)
#0  0x00b2ed66 in _XError () from /usr/X11R6/lib/libX11.so.6
#1  0x00b2f557 in _XReply () from /usr/X11R6/lib/libX11.so.6
#2  0x00b2a0f6 in XSync () from /usr/X11R6/lib/libX11.so.6
#3  0x00b2a1ad in XSync () from /usr/X11R6/lib/libX11.so.6
#4  0x00b2c7e5 in XCreateWindow () from /usr/X11R6/lib/libX11.so.6
#5  0x08052c0e in grinit (argc=0xbfee3d40, argv=0xbfee3dc4) at grinit.c:117
#6  0x08066a40 in main (argc=1, argv=0xbfee3dc4, envp=0xbfee3dcc) at tgs.c:103

(Second run)
(gdb) where
#0  0x00b2ed66 in _XError () from /usr/X11R6/lib/libX11.so.6
#1  0x00b2f557 in _XReply () from /usr/X11R6/lib/libX11.so.6
#2  0x00b0b7e9 in XAllocColorCells () from /usr/X11R6/lib/libX11.so.6
#3  0x08052c81 in grinit (argc=0xbfe15390, argv=0xbfe15414) at grinit.c:124
#4  0x08066a40 in main (argc=1, argv=0xbfe15414, envp=0xbfe1541c) at tgs.c:103








More information about the xorg mailing list