Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!usc!aero-c!aero!aerospace.aero.org!slewis From: slewis@aerospace.aero.org Newsgroups: comp.sys.mac.programmer Subject: Help program runs in THINK Debugger Application crashes Message-ID: <99541@aerospace.AERO.ORG> Date: 6 Feb 91 17:37:31 GMT Sender: news@aerospace.aero.org Reply-To: slewis@aerospace.aero.org () Organization: The Aerospace Corporation, El Segundo, CA Lines: 32 I am hiving problems with my programs running perfectly in the Think C Debugger and crashing when compiles as an application. Here is my initialization code. I sometimes get complete crashes and sometimes error 28 (stack overflow). Setting the Stack to 100000 or 150000 does not cure the problem. The call to MaxApplZone can be in or out ( I have had problems running on the SE with it. Any Suggestions? This is my initialization code. void InitializeSystem() { /* Increase the stack size */ if(!(SetStackSize( 50000L) == noErr)) error_exit("Cannot raise stack size"); MaxApplZone(); /* SE Cannot run with this */ InitGraf(&thePort); /* initialize QuickDraw, 'thePort' holds QuickDraw's variables */ InitFonts(); /* initialize the Font Manager */ FlushEvents(everyEvent, 0); /* get rid of pending events in the queue */ InitWindows(); /* initialize the Window Manager */ InitMenus(); /* initialize Menu Manager */ TEInit(); /* initialize TextEdit */ InitDialogs(0L); /* initialize the Dialog Manager */ InitTheCursor(); /* gives predefined arrow cursor, level = 0 */ }