- EGPFault,"General protection fault in module WSYBDB.DLL at 0004:6D7A".

In article <01bc7fc7$c6be21e0$5eab4...@Peter.Govers.CMG.NL> "Peter Govers" <Peter.Gov...@cmg.nl> writes:

>I was pleased to get all the different reactions about my previous calls.
>I still get the above error-message when I closing my application.
>Does somebody have an answer

To start with, run WinSpector (16-bit) to get a complete traceback of all the
calls leading up to the GPF.  The message produced by Windows considers only
the instruction-address which is part of the GPF interrupt, and that's not
particularly helpful.

Second, I would suggest that you *assume* that a GPF occurring at shutdown
time is probably caused by an object being freed twice, e.g. by the
termination/cleanup code of the various VCL objects you are using or the form

I suggest specifically that, each and every time you free something anywhere
in your code, you explicitly set it to NIL with the very next(!) statement.  
Do this everywhere in your program and do it forever.  Also, I suggest that
whenever you have an object-type variable, unless it occurs in another object
(which is always initialized to binary zeroes during creation), explicitly set
it to NIL in the prologue of the module or unit in which it is declared.

"Stale pointers" are the most common cause of every GPF I have ever seen.  
Only the programmer's own discipline removes them.  And before you say "oh, it
takes too long..." stop and calculate just how many hours (figure 10 hours for
each day) you've spent trying to debug this show-stopper.  Multiply by a good
working rate of $75.00 (US) per hour...  :-/