Re: IDL bus errors [message #6046] |
Thu, 04 April 1996 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
rfinch@water.ca.gov (Ralph Finch) wrote:
>
> IDL 4.0.1, Solaris 2.4, Sparc 20.
>
> We use a 15,000+ line IDL program to manipulate data. It's not
> uncommon for this program to crash several times during the day with a
> bus error, which is pretty annoying, because apart from the crash it's
> just about impossible to track the source of the error without putting
> in lots of print statements throughout the code to track location. Do
> other people get this problem, and if so, do you think it's an IDL
> problem or our programming? How can we identify the location and fix
> it?
>
First, while you are debugging the program remove all occurances
of ON_ERROR, 2 (you want the default, which is to stop at the statement
that caused the error). This allows IDL to give a more informative
error message, including line-numbers from the offending statement
(if you use ON_ERROR 2 in your event handler, you get only the
line-number from the offending function (if it IS in a function),
and if the function calls are nested, it gets really messy).
Second, if you are using CALL_EXTERNAL to call C or Fortran
functions, then look carefully at these. Check the arguments
to make sure they agree in type, size, etc. The only Bus errors
I've encountered occured when I was debugging a CALL_EXTERNAL
call, and the problem was usually the arguments.
Hope this is useful. Feel free to contact me if you have any
questions.
Dave Foster
UCSD Brain Image Analysis Lab
foster@bial1.ucsd.edu
|
|
|