Debugging protocol errors

Peter Hutterer mailinglists at who-t.net
Mon Apr 16 16:45:51 PDT 2007


On 16/04/2007, at 23:37 , Matthew Allen wrote:
> So the problem is that I'm getting a BadWindow reported when  
> calling XPending. I've turned on sync using XSyncronize() and I've  
> installed an protocol error handler. But the error handler never  
> gets called? So assuming that sync is on I run the program in gdb,  
> set a breakpoint on _XError and ran it till it stopped at the  
> breakpoint. The stack trace only mentioned XPending. At this point  
> I have no idea which function call caused the error or even which  
> handle was involved. Which makes it nigh impossible to find the issue.

Usually the error also gives you the protocol request number. Look at  
Xproto.h to map back from request number to actual request.

Also look at "Debugging X Window System Protocol Errors"
http://www.rahul.net/kenton/perrors.html


Cheers,
   Peter

--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx





More information about the xorg mailing list