             Ghostscript Errors

PostScript operates by maintaining several
stacks, on which various objects are placed
and operated on.  When an error occurs,
Ghostscript will print an error message and
will display the contents of its stacks in
the console window.  This stack dump is
sometimes difficult to interpret, and the
source of the error may not be clear.
Generally, the name of the error that
occured and the contents of the operand
stack are most useful in decoding the error
message.

After an error occurs, the prompt may
change to look something like GS<3>.  This
means that there are now three objects
remaining on the operand stack.  Typing
"clear" or typing "pop" three times will
clear the stack.  Typing "==" will display
the object on the top of the stack.

Some common errors are:

/undefinedfilename in --file--
GS could not open the file whose name is on
the operand stack. If the file name begins
with gs_, it is a startup file required by
GS. Check the GS_LIB environment variable
(see the files "use.doc" and "readme.st").

/undefined in somename
GS has encountered a procedure or variable
"somename", which has not been defined.
Often this is the result of a missing
header file which should be run before the
offending file.

/rangecheck in --somename--
The procedure "somename" was passed a bad
value as an argument.  For example, passing
a negative number to the sqrt operator will
result in a rangecheck error. The offending
argument should be on the operand stack.

/typecheck in --somename--
The procedure "somename" was passed a
parameter of the wrong type.  For example,
passing a string to the add operator will
result in a typecheck error.  The offending
argument should be on the operand stack.

/VMerror
Ghostscript has run out of memory.  Try
reducing the resolution of the image.
