This discovered using gimp and the latest aiptek tablet driver from the aiptek svn, but it probably effects other devices as well. Gimp or some other client crashes at random times while drawing with the device. The bug also probably effects 7.2. I am not sure about git. A patch is submitted below. This is the explanation of the bug and patch: Read() from the client connection often returns with an EAGAIN error. Other errors are considered fatal and the server closes the connection and the client crashes. If a signal from the Xinput device happens between the read() call and the check of errno, the signal handler does other system calls which trash errno. The patch is to the signal handler. I hope that this is helpful. diff -ru xorg-server-X11R7.1-1.1.0/hw/xfree86/common/xf86Events.c my_xorg-server-X11R7.1-1.1.0/hw/xfree86/common/xf86Events.c --- xorg-server-X11R7.1-1.1.0/hw/xfree86/common/xf86Events.c 2006-03-25 13:52:03.000000000 -0600 +++ my_xorg-server-X11R7.1-1.1.0/hw/xfree86/common/xf86Events.c 2007-04-16 15:10:52.000000000 -0500 @@ -1230,12 +1230,14 @@ xf86SigioReadInput(int fd, void *closure) { + int err_save = errno; int sigstate = xf86BlockSIGIO(); InputInfoPtr pInfo = (InputInfoPtr) closure; pInfo->read_input(pInfo); xf86UnblockSIGIO(sigstate); + errno = err_save; } /*
thanks for your analysis!
As an amateur, I am pretty proud of myself for running this down, but I just realized that my patch completely ignores the distinction between os dependent and independent code.
i think every platform we have uses errno. if not, it's a relatively simple matter to wrap it in #ifdef HAVE_ERRNO.
It seems to solve my troubles with my trust400-v2 (aiptek driver), I applied the patch, now applications don't crash anymore.
i also applied the patch, it solved my crash problem, thanks.
pushed to master and input-fixes-for-1.4.1.
(In reply to comment #6) > pushed to master and input-fixes-for-1.4.1. > Does that mean it will be included in 1.4.1? Or does it still need to be approved? If so, take my vote for inclusion. I also got an aiptek-based tablet and last time I used the driver, about 2 months ago, it kept crashing the Xserver and random applications.
it's already included in 1.4.0.90 and will also be in 1.4.1.
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.