Delayed XTestFakeRelativeMotionEvent() causing client crash
Thomas Jaeger
thjaeger at gmail.com
Sat Jan 3 19:19:16 PST 2009
Using the latest xserver from server-1.6 branch, when
XTestFakeRelativeMotionEvent is called with a delay parameter !=
CurrentTime, the client may crash under certain circumstances. I've
also seen problems with the same symptons on earlier X servers, but I've
never been able to reproduce them. The replies the server sends seem to
violate some assumptions that libx11/libxcb make, but I'm not familiar
with wire protocol, so I'm not quite sure what it is. The problem
manifests itself in (at least) three forms:
(1) XNextEvent crashes because _XReadEvents leaves behind an empty queue
(2) _XReply raises an I/O error because there is no reply
(3) process_responses: Assertion `((int) (((dpy->last_request_read)) -
((dpy->request))) <= 0)' failed.
Here's the program that I can use to reproduce the problem. When the
left mouse button is pressed, it freezes Button1 event processing until
the mouse is released (the freeze doesn't apply to the XInput release
event) and then replays the events. The XTestFakeRelativeMotionEvent
call is necessary for other clients to be made aware of the current
pointer position, it would be nice if this call wasn't needed, see
http://lists.freedesktop.org/archives/xorg/2009-January/042039.html
The source needs to be manually edited to reflect the device being used.
The program doesn't demonstrate the problem equally well on all
devices: my track point and my USB mouse exhibit the problem every
single time, my stylus only about every 10th time.
Any pointers how to further debug the issue are appreciated.
Thanks,
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cc
Type: text/x-c++src
Size: 1484 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090103/79dd240b/attachment.cc>
More information about the xorg
mailing list