Hi, when injecting input via XTEST into an XI2 master device, the X server sometimes segfaults at dix/events.c:3654. The offending code is if (pWin->optional && CheckPassiveGrabsOnWindow(pWin, device, event, sendCore)) in CheckDeviceGrabs() . Adding a 'pWin &&' check solves the problem. Happens on Ubuntu 10.10 with X server 1.9. I hope that's enough info, but I can provide X log and backtrace if needed... Cheers, Christian
Created attachment 40391 [details] X log file of occuring segfault Okay, seems rather hard to reproduce. What i have is VCP, VCK as normal plus some XI2 MD pairs without any slave devices (that is, only the XTEST ones). I'm injecting fake motion, button and key events. $ addr2line -e /usr/bin/X 0x807ae75 /build/buildd/xorg-server-1.9.0/build-main/dix/../../dix/events.c:3654 Let's see if I manage to get a backtrace as well...
do you have the source for the program you use to inject events available?
Yeah here it is -> https://github.com/bk138/x11vnc-multiptr. Build with ./autogen.sh --with-x11vnc --disable-shared && make Start with x11vnc/x11vnc -multiptr -shared Connect with your favourite VNC viewer. Still, I'm not sure how to reproduce this reliably... PS: The actual cmdline args I use are -shared -forever -mdns -multiptr -nowait_bog -pointer_mode 4 -threads -afteraccept setcursor_helper -extra_fbur 10 -setdefer 2 -nonap which mainly enable multithreading and do some tuning. What may be of interest here is that I use a rather hacky approach to _always_ show a labeled cursor (this is this setcursor_helper thingy started above when a client connects). It's source is here -> https://github.com/bk138/x11vnc-multiptr/blob/multiptr/x11vnc/misc/xi2setcursor.c. Maybe there's a cleaner solution...
(In reply to comment #3) > Yeah here it is -> https://github.com/bk138/x11vnc-multiptr. > Build with > > ./autogen.sh --with-x11vnc --disable-shared && make gave up after battling with build errors for 15 min, sorry.
(In reply to comment #4) > (In reply to comment #3) > > Yeah here it is -> https://github.com/bk138/x11vnc-multiptr. > > Build with > > > > ./autogen.sh --with-x11vnc --disable-shared && make > > gave up after battling with build errors for 15 min, sorry. hmm, builds fine here (debian squeeze box). and now? shall i provide a binary? anyway, i'll try to find a way to reproduce this reliably in the next days and post the procedure here...
As the offending lines don' exist anymore in the XServer 1.10 code (by commit http://cgit.freedesktop.org/xorg/xserver/commit/?id=1c1811ecafc144151630b3588394e2c345c53aa4), this bug can be closed.
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.