PDA

View Full Version : Crash on Quit



Gavin
10-18-2000, 02:57 AM
My app works fine and runs as it should, but when quitting it it crashes and kills all around it! Is this ogl/glut having problems cleaning up memory? Anyone else had these probs?
macos9

cheers

gav

cire
10-18-2000, 12:49 PM
Easiest thing to do is start with a basic GLUT app from the SDK (like glutmech). We know it doesn't crash, so it's most likely not a GLUT prob.

Then, using this code as a starting point, add your code bit by bit, and test incrementally. As soon as your app starts killing things on quit, then you'll have a better idea of what code caused the mishap.

/ec

DJ Tricky S
10-29-2000, 08:45 PM
I get dumped into the depths of the ATI driver code in Macsbug whenever I exit several of the Mac OpenGL SDK demo apps. You are not alone http://www.opengl.org/discussion_boards/ubb/redface.gif)

11-10-2000, 07:49 PM
Gavin et al

I too have experienced these problems, ie big time crash when quiting a glut based program from menubar

It only happens if I choose quit from the menubar. If I provide a "hit Q to quit" keyboard routine and exit(0) in that routine, everything works fine.

Any better solutions/workarounds?

greg

didsoft@home.com

11-10-2000, 08:19 PM
I may have figured it out. I noticed that the one of the glut based examples I had that worked included a line after glutCreateWindow("colorcube")

glutIdleFunc(NULL);

adding this to my crahsing sample fixed it. Other examples I had that worked passed the display function in glutIdleFunc, ie glutIdleFunc(myDisplay)

hope that helps

greg

Gavin
11-23-2000, 07:30 AM
I am using an Idle Function though, not the display, but some other processing stuff. Anyone get any interesting error logs with it?

gav

11-27-2000, 05:02 AM
I installed Mac OS X (Japanese language version) few days ago. Then my glut app began to crush on quit on Mac OS 9.0.4. The app ran fine before.
Mac OS X Installer adds/replaces some system files and OpenGL library(s) in the extension folder of Mac OS 9 for 'Classic environment compatibility'.
I uninstalled Mac OS X, and restored all replaced system files in Mac OS 9.0.4 system folder.
Now my glut app runs fine.

This is my case.
I use CodeWarrior 6.

Gavin
11-28-2000, 06:11 AM
Mybe it as I did have mac osx, and have removed it, maybe a os reinstall might help...

gav
i'll let you know

Gavin
11-28-2000, 09:14 AM
Well, just compiled on unix/irix to see whats going on a bit better, no crash, no xmesa error message, no error log. Then recomile on mac, run, quite, RESTART, arrgghh

gav

Gavin
02-08-2001, 01:41 AM
I assume that you are all on the mac-opengl mailing list. It appears that it was the classic rave that was causing my app to die on quit, as it is know fine, and happy....

gav

G4Soon
02-19-2001, 07:38 PM
I had a problem like that (crashing when quit from the menu item) in an app I made, the solution was simple:

create a variable that flags when you want to quit.

instead of quitting right on the menu action, set that variable to true.

at the end of your main loop, if that variable is true, quit.

hope this is some help.

Gavin
02-20-2001, 03:16 AM
See my last post, it may help you as well! :-)

gav