[comp.windows.x] Why does XtAddTimeout blowup?

gpasq@picuxa.UUCP (Greg Pasquariello X1190) (08/29/88)

Given the following program, why does the routine called by the timeout
do it's thing, then blow up with a signal 10 (System 5 bus error).

My feeling is that something is happening when the process is removed
from the timeout list or shortly thereafter. 

Any ideas/fixes?  Thanks in advance.
Greg Pasquariello

--------CUT HERE---------------

#include	<X11/Intrinsic.h>
#include	<X11/StringDefs.h>
#include	<X11/Label.h>


Widget	toplevel,
	label;
Arg	wargs[] = {
	{XtNlabel, "Imaginitive Label Here"}
	};

void	timerproc();

main(argc, argv)
int	argc;
char	**argv;
	{
	register int	n;

	toplevel = XtInitialize("main", "XFm", NULL, 0, &argc, argv);

	label = XtCreateManagedWidget("label", labelWidgetClass, 
		toplevel, wargs, XtNumber(wargs));

	XtRealizeWidget(toplevel);
	XtAddTimeOut((unsigned long)10, timerproc, NULL);
	XtMainLoop();
	}

void timerproc(client, id)
caddr_t		client;
XtIntervalId	*id;
	{
	printf("Timer popped\n");	
	}

-- 
=========================================================================
Greg Pasquariello                   AT&T Product Integration Center
att!picuxa!gpasq                299 Jefferson Rd, Parsippany, NJ 07054
=========================================================================

swick@ATHENA.MIT.EDU (Ralph R. Swick) (08/29/88)

Xstuff fix #24 should correct this problem.

gpasq@picuxa.UUCP (Greg Pasquariello X1190) (08/30/88)

In article <8808291445.AA09170@LYRE.MIT.EDU> swick@ATHENA.MIT.EDU (Ralph R. Swick) writes:
>Xstuff fix #24 should correct this problem.

Problem is, I don't have the source.  If anyone can send it to me (just the
fixed XtAddTimeOut) so I can recompile and add it to my library, I would
appreciate it.

Thanks.
-- 
=========================================================================
Greg Pasquariello                   AT&T Product Integration Center
att!picuxa!gpasq                299 Jefferson Rd, Parsippany, NJ 07054
=========================================================================