Subject: proposed fix for XF4 crashing
To: None <>
From: IWAMOTO Toshihiro <>
List: current-users
Date: 01/08/2002 22:39:27

I think I've finally found the cause of often crashes of XFree 4.x
servers, which annoyed me for ~2 years.
For me, these crashes usually happen if I try to move a mouse while an
X server is busy loading or resizing Asian characters.
If you use European (1 byte) characters only, it is likely you aren't
aware of this problem.

Although I tried the following patch on several machines, I'm not
yet very sure this actually fix the problem. So I'd like to here some
more test result before committing this.  If you are having the same
trouble as mine, please try this patch and report the result.

My guess is that the crashes are due to race between pointer motion
event queueing (which happens from signal handler) and removal of
events from the queue.

Index: xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c
RCS file: /cvs/cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v
retrieving revision
diff -u -r1.1.1.2 bsd_mouse.c
--- bsd/bsd_mouse.c	2001/03/18 17:33:05
+++ bsd/bsd_mouse.c	2002/01/07 12:02:36
@@ -236,7 +236,7 @@
 		pInfo->fd = -1;
 	    } else {
-		if (!xf86InstallSIGIOHandler (pInfo->fd, wsconsSigioReadInput, pInfo))
+/*		if (!xf86InstallSIGIOHandler (pInfo->fd, wsconsSigioReadInput, pInfo)) */
@@ -427,8 +427,8 @@
 		pInfo->fd = -1;
 	    } else {
-		if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput, 
-					      pInfo))
+/*		if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput, 
+					      pInfo)) */