[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bus error blues



> Date: Tue, 22 Sep 92 17:24:03 -0500
> From: David Kieras <kieras@engin.umich.edu>
> 
> This is not strictly Lisp related, except that I got MCL and a Quadra so that
> I could do some long compute-intensive runs using a friendly development
> environment.  Problem is my Q700 crashes out with a "bus error" often
> enough to be a problem; I lost a couple of hours of running because of
> this problem just now.  What little I know about bus errors is that
> they could have many possible causes.  Can anybody suggest how to approach
> this tracking this down?

Although it sounds like hardware, the most common cause of bus errors is 
software.  "Bus error" is how any reference to an invalid address is reported; 
it's the most common symptom of C or Pascal software gone awry.  Clobbering 
memory (either low memory or in the Mac heap) usually causes a bus error.  You 
shouldn't be able to cause bus errors with Lisp code if you don't use Lap or 
any of the low-level primitives (e.g. %put-long, rref) for referencing non-Lisp 
memory, unless there is a serious bug in the Lisp compiler, which is unlikely.

The first two things to try would be to remove any questionable inits or system 
extensions and see if the problem goes away, and to obtain a debugger such as 
MacsBug or TMon and do some painful assembly language debugging when the bus 
error happens (at least see what program you are running and what the bad 
address was).

Congratulations, you have arrived at one of the most unpleasant aspects of 
program development on the Macintosh!