Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sco!jamesm From: jamesm@sco.COM (James M. Moore) Newsgroups: comp.sys.mac.programmer Subject: Re: Debugger Info wanted Message-ID: <7833@viscous.sco.COM> Date: 4 Dec 89 17:17:19 GMT References: <1262@castle.ed.ac.uk> <32962@ucbvax.BERKELEY.EDU> Sender: news@sco.COM Reply-To: jamesm@sco.COM (James M. Moore) Organization: An tOibriu Santa Cruz Lines: 24 In airteagal <32962@ucbvax.BERKELEY.EDU>, scriobhann oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster): >The most common cause of complete lockup of the Macintosh by buggy programs >is: > >Copying arbitrary data into low memory, for example: My favorite way (discovered last night) is to be really lazy about allocation of variables, and put too much stuff on the stack. I was allocating 2048 byes of chars (char bigstring[2048]) on entry into a method, and whenever I entered the method I got a message from Multifinder saying my application had quit unexpectedly. At that point, the mouse was usually frozen, and I had to reboot. Yes, I know this is a dumb thing, and I should have caught it immediately. And needless to say the code doesn't do this anymore. Still, I burned at least an hour and a half finding the thing, mostly because I also managed to corrupt the resource file when it went down. If you corrupt your resource file, TCL tends to crash before you get into your own code. Easy to fix once you figure out what's going on. -- James Moore | Nil aon .sig maith agam anois - Santa Cruz Operation UNIX Tech Support | B'fheidir an tseachtaine seo jamesm@sco.com | chugainn.