Warnings, Errors and Crashes


Contents Summary

Detailed Contents
1. Introduction
2. Starting DigImage
3. Basic Operation
4. Sample Session
5. Command Files
6. Movies
7. Coordinate Systems
8. Warnings, Errors and Crashes
9. Utilities
10. Macros
11. Other Considerations
12. Updates
Appendix A: Menus
Index


8. Warnings, Errors and Crashes

During normal operation, DigImage may from time to time generate one of four types of error message.

8.1 WARNINGS

This is most mild form of error. A typical example is

WARNING: Unable to open histogram file
Press any key to continue (<escape> to stop current activity)...
->

This form of message will be produced either when DigImage is unable to perform some non-critical activity (such as opening an optional output file), when proceeding would alter some critical file which already exists, or when it has failed to achieve some expected result. The cause of the error may be external to DigImage (such as running out of disk space or the non-existence of a file), or due to some subtle clash between the requested activity and the image being processed. Execution of the current activity is possible, although the user may press <escape> to abort it and return to the parent menu.

When executing a command file, it is possible to suppress the generation of warning messages using the !SW OFF command. This command may be cancelled explicitly at any time with !SW ON. It will automatically be cancelled and warnings enabled when the command file is closed.

8.2 ERRORS

A somewhat more severe form of error generates a message of the form

ERROR: Unable to open plot file
Press any key to continue...
->

Such an error message is produced when DigImage is unable to continue with the current activity. The message will usually give a clear indication as to what the problem is. Generation of message terminates the current activity in a manner equivalent to pressing <escape>. Pressing any key will return control to the parent menu.

8.3 FATAL ERRORS

This is the most serious form of explicitly trapped error. Its occurrence is sufficiently severe that the current activity being performed by DigImage will be terminated. All open files will be closed (including the command and journal files). Execution will continue from the main DigImage menu. If previously in use, the journal file will be reopened and the error noted.

FATAL ERROR: Unable to open menu file
Press any key to return to main menu...
->

Typically a fatal error message will be generated by some internal fault for which the continue current option is inadvisable. Control of DigImage is returned to the main menu.

8.4 UNTRAPPED ERRORS

This class of error is not trapped explicitly by the program being executed. When an error or exception occurs during the execution of a routine (such as a "divide by zero", "floating point overflow", or "no space left on device" = disk full), the normal Fortran critical error handling routines would cause DigImage to be terminated in an untidy manner. However, DigImage includes additional code to implicitly trap these errors. The Fortran or MS-DOS error message is generated, but instead of the program immediately terminating, the user is given the option of returning to the main menu. The mechanism through which this operates is very similar to that invoked by the <ctrl><break> sequence and the trapped Fatal Error condition.

As an example of how the implicit error trapping operates, try the following command file (or enter the sequence interactively):

# Example of how to crash DigImage by floating point overflow.
; Return to main menu
G: Grab/Display
M: Manipulate image
A: ALU operations
16 - simply pass the input through
# Select Input Look Up Table
V  User specified formula
EXP(1000*i)
Window

At this point a temporary input look up table will be generated from the formula given. However the formula is capable of generating values outside the range allowable for the REAL*4 variables used internally. The range is not checked explicitly, so an untrapped error will be generated. This error is then implicitly trapped by DigImage before the program terminates to produce the following output:

run-time error M6104: MATH
- floating-point error: overflow
FATAL ERROR

Press any key to return to main menu
(Q to quit DigImage)
->

The computer will also beep twice. Pressing any key other than <Q> will return DigImage to the main menu. Normally it is possible to carry on using DigImage without any difficulty. However, in some (rare) circumstances, the internal status of DigImage may have been corrupted by the error and lead to either unexpected results, or cause DigImage to crash.

8.5 CRASHES

At present there are a few forms of error which are not trapped by any of the above mechanisms. For example if an array writes outside its bounds it may overwrite other critical data or code. In some circumstances this will lead to the program being corrupted to a degree which none of the error trapping mechanisms can deal with. DigImage will not be able to terminate gracefully under these circumstances. In general if this happens, DigImage will "hang" or "crash", refusing to respond to input from the keyboard. In such cases it will be necessary to reboot the computer. Errors of this type are very unlikely to occur in the executable system supplied by DL Research Partners, but may occur in partially tested user-written modules. If you discover such an error in the supplied executable system, we would appreciate full details of the error so that it may be corrected in the next version of DigImage.

Goto next document (Utilities)


Links

SYSTEM OVERVIEW

Contents
Index

OTHER

DigImage documentation page
DigImage home page
Stuart Dalziel's home page


Stuart Dalziel, last page update: 21 June 1999