Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!leah!itsgw!steinmetz!uunet!portal!cup.portal.com!jwhitnell From: jwhitnell@cup.portal.com Newsgroups: comp.sys.mac.programmer Subject: Re: Think C 3.0 Bug? Message-ID: <8745@cup.portal.com> Date: 3 Sep 88 23:27:40 GMT References: <2998@mit-amt> Organization: The Portal System (TM) Lines: 33 XPortal-User-Id: 1.1001.3098 phil@mit-amt (a phil sohn) writes... | I am having some problems with Think C 3.0, and I wonder if |anyone can shed some light. I am getting many illegal errors and |trying to execute odd address on my two meg Mac II. Sometimes it even |just hangs or crashes right through Macsbug. (Not into, but through |maybe killing video sync.) I have no idea how I can be generating |these errors since I am writting no in line assembly. Why is the |compiler generating code that produces illegal errors? This is |espically agravating since I am running the symbolic debugger! Why |do things get through it like that? The problem is most likly a bug (or bugs) in your code. But because LSD depends on the ROM and MultiFinder to be in a working state, if your program trashs low memory or the heap, it can crash LSD. And since the crash can happen in ROM or elsewhere, you'll get illegal instructions, bus errors (MAC II only) and dead systems. I've talked to people at THINK about this, suggesting they add more error checking, but if and when they'll do it is anybodies guess. Some things to check are the menu bar data structures (calling SetMenuBar with a non-MBAR is a real quick way to trash your machine) and the window list. Trashing either of these guarentees a quick and violent death. Another think to try is run TMON with strict trap discipline. This will catch some of the above, but not all. Finally, use prototypes and Check Pointer Types options to check your code at compile time. Jerry -- Jerry Whitnell jwhitnell@cup.portal.com ..!sun!cup.portal.com!jwhitnell