Mail Archives: djgpp/1994/07/29/16:35:54
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?
- Raw text -