Created attachment 22867 [details] [review] proposed patch Bug exists in both server-16-branch and master, server-1.5-branch works fine. DeleteInputDeviceRequest function doesn't handle "virtual" devices well. TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such kind of devices. libvnc.so devices are slave devices but they doesn't have LocalDevice structure.
I see the problem, but I'm not quite sure why it happens. How comes the xfree86's DeleteInputDeviceRequest is called on removal, but the same (i.e. xfree86) API isn't used to create the devices in the first place?
Well, let me try to explain why. Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice & RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c so everything works fine (now I see that DeleteInputDeviceRequest in Xi/stubs.c should call RemoveDevice function, shouldn't it? :) ) Situation is quite different when you use libvnc.so module. It uses same schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus device is created correctly. When server is terminated it calls DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices don't have real input driver.
so switching libvnc to use the right API isn't an option? (that's an honest question, I'm trying to understand why it's using this approach)
Fix pushed as 1df6716281579e2937743d840ab1079343c503ac.
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.