What's With All Those Error Messages?

Jun 11
21:00

2003

Stephen Bucaro

Stephen Bucaro

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

... is granted for the below article to ... ... use for ezine, ... ... as free bonus or part of

mediaimage

----------------------------------------------------------
Permission is granted for the below article to forward,
reprint,What's With All Those Error Messages? Articles distribute, use for ezine, newsletter, website,
offer as free bonus or part of a product for sale as long
as no changes are made and the byline, copyright, and the
resource box below is included.
----------------------------------------------------------
What's With All Those Error Messages?

By Stephen Bucaro

Your software application pops up an error message with
some cryptic message like "Unexpected Application Error",
"General Protection Fault" or "Illegal Operation". You
don't have a clue as to what the message means. Illegal
Operation! What did you do wrong?

YOU didn't do anything wrong. Somewhere along the line a
programmer did something wrong. In this article, I'm going
to give you some insight into those cryptic error messages.

General Protection Fault (GPF)

Each application running on your computer stakes out a
4GB area of memory to park itself and all of it's data.
All other applications (including other instances of the
same application) are forbidden from using that memory
area. If an application tries to store something in
another applications memory area - BAM! General Protection
Fault!

GPFs can be caused by the operating systems overcomplicated
memory management scheme. To understand how complicated
that scheme is, realize that your computer may not even
have 4GB of memory and hard disk space combined, but you
can still run multiple applications that each think they
have 4GB of memory to work with. That's real smoke and
mirrors!

As complicated as that scheme is, GPFs are rarely caused
by the operating system. That's because every operating
system uses the same time tested and proven memory
management scheme. GPFs are usually caused by an
application programmers coding error. Here are some other
possible causes of GPFs.

* Bad memory chip
* Failing hard disk
* Computer overheating

Illegal Operation

This error is not caused by an illegal operation by you.
Your application tried to perform an illegal operation.
One example of an illegal operation is "divide by zero".
Enter a number in your calculator and then divide it by
zero. Your calculator will display the message "Error".
It's illegal to divide a number by zero.

Somewhere in the applications sequence of operation, a
mathematical operation resulted in a value of zero. The
programmer didn't test for this before they used the number
as the divisor in another mathematical operation. Result,
Illegal Operation!

There are many other possible illegal operations. An
Illegal Operation error is almost always the result of a
programmer's error.

Unexpected Application Error (UAE)

When a programmer creates the code for an application to
write to a file, they must first put code to "open" the
file. If an application tries to write to a file without
opening it first, you get the message "Unexpected
Application Error". There are many other possible UAEs.
An UAE is almost always the result of a programmers error.

One thing I've learned as a programmer is that users will
always find a way to break your program. A programmer
designs the application to be used in a logical manner.
Users never read the help file. They just start executing
menu selections in an irrational manner. The program
crashes.

Let's make one thing clear. It is the programmers duty to
anticipate every possible way that the user can operate
the application, and to code provisions to protect the
program and the user from undesirable results. With a
large, powerful and complex application this requires an
enormous amount of testing and debugging time.

The concept of "beta" software (and most freeware and
shareware) is to toss the application out to the public
and let them do the testing. For the application developer,
this has advantages and disadvantages. Advantage: you
get better testing and it's free. Disadvantage: The public
doesn't understand "beta" software and the application
may get a bad reputation as being buggy.

Nonsensical Error Messages

You accidentally try to save a file to a drive that
doesn't exist and you get the error message "Error, choose
another color". Nonsense error messages result from the
way error messages are coded into a program. For example,
an application may have six different places in the code
where it opens a file. The programmer can code the error
message "File doesn't exist" six times, or the programmer
can code a list containing all the error messages used in
the application and then reference the message in that
list.

The list may contain hundreds of messages. Now, while
coding, the programmer needs another error message. The
programmer can add an accurate message to the list, or
choose to reference an existing message. The lazy
programmer chooses to reference an existing message in
the list that only vaguely relates to the actual error.

Next time your application pops up some cryptic error
message, you now have some idea as to what the message
means. Most errors are not caused by something the user
did. They are caused by programmers mistakes. You also now
know why you sometimes get nonsense error messages.
----------------------------------------------------------
Resource Box:
Copyright(C)2003 Bucaro TecHelp. To learn how to maintain
your computer and use it more effectively to design a Web
site and make money on the Web visit
http://bucarotechelp.com
To subscribe to Bucaro TecHelp Newsletter Send a blank
email to mailto:bucarotechelp-subscribe@topica.com
----------------------------------------------------------