From: wrh AT placer1 DOT wimsey DOT com (William Hughes) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: mouse and fgets Reply-To: wrh AT placer1 DOT wimsey DOT com Date: Fri, 29 Jul 94 09:17:29 PDT hi all, I have a mystery for you. I am loading a file using fgets. While this file loading is going on, the mouse and keyboard event handler are watching for the user to indicate that he wants to stop (by pressing a key or clicking a button). At the same time I am drawing a bar across the screen to indicate the progress of the load. The program is loading in a large number of points and calculating a 3d outer hull on the go. I am using a GUI I wrote myself, and using the event library from Csaba. The problem is, whenever the user wiggles the mouse a lot (moving it a little bit won't do it) the program crashes. A symbol traceback shows that the various functions executed (following an event driven GUI back is pretty convoluted) but that the last function executed was fgets, which appeared to call a function 0 at address 0. Calling a function with the same address as a null pointer crashed it (no kidding! 8) Now, I am baffled. Why would it do this only when the mouse was moved? I have disabled mouse drawing for the duration of the file load, and this seems to have helped (at least, it doesn't crash when the mouse is moved anymore) but I have a feeling I have gone and treated a symptom. Ideas?