Re: Strange error msg.

From: Dick Hendrickson (
Date: 12/07/04

Date: Tue, 07 Dec 2004 17:10:36 GMT

Squirrel wrote:
> I am maintaining a Fortran program of ~ 10000 lines of code which _used_
> to behave friendly. Now, the program randomly crashes with the following
> message:
> jwe0020i-u An error was detected during an abnormal termination process.
> The behaviour is not exactly reproducable, sometimes a simple restart of
> the program doesn't end up in an error.
The causes of all unreproducable errors are usually an
array subscript error, an argument mismatch, or failure
to initialize variables before using them.

Turn on as many compiler checking options as you can find.
All good compilers have an array subscript bounds check

Most compilers have a way to force checking of argument
lists for agreement. It's easy to leave out an argument
or get them out of order if there's a ton of them in a call.
Also, it's common to mix up type, where you pass a double
to a single precision argument, or vice versa (especially
easy to do with constants--pass 1.0 to a subroutine that
expects a double precision argument). It's a darn good
idea(tm) to put your subroutines in modules, ala F90,
if you have the time to do it. This essentially forces
the compiler to make a slew of compile time error checks.

Many compilers have an option to check for unitialized
variables at compile time or (better) at run time.
Remember, Fortran doesn't preset memory to zero before
a program starts. At the least, put in IMPLICIT NONE
statements into each routine, that will at least catch
spelling errors, like typing l1l1l10O when you meant
l1ll110O ;) .

Dick Hendrickson

> Has anybody got an idea, where to start searching for a coding error?
> Compiler: Lahey LF59, 5.6h
> OS: Windows XPProfessional, SP2