Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!tub!net From: net@tub.UUCP (Oliver Laumann) Newsgroups: comp.windows.x Subject: XtRemoveInput in X11R4 is broken Message-ID: <1175@tub.UUCP> Date: 14 Feb 90 17:00:17 GMT Reply-To: net@tub.UUCP (Oliver Laumann) Organization: Technical University of Berlin, Germany Lines: 27 The following program (when compiled under X11R4) dumps core in XtRemoveInput(): main () { XtAppContext c; XtInputId i; XtToolkitInitialize (); c = XtCreateApplicationContext (); i = XtAppAddInput (c, 1, XtInputWriteMask, main, 0); XtRemoveInput (i); } It works fine when XtInputReadMask is used instead of XtInputWriteMask. In general, XtRemoveInput seems to dump core when a data sink is registered, but no data source has been registered yet in the same application context. In this case, the queue holding the data sources (selectRqueue) is not allocated, but it is searched in XtRemoveInput. I assume no-one has ever tried to register an "input" source with XtInputWriteMask, otherwise this bug wouldn't have survived until X11R4... Regards, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP