> -----Original Message-----
> > Is someone in a position to know about the type of message
> that Delphi
> > generates when you deference a nil pointer.
> >
> > It used to be that you knew because the address given was
> FFFFFFFF. But these
> > days the address seems to be much closer to 0.
>
> It's more than just nil pointers that'll give the
> EAccessViolation... Any uninitialised
> pointer (including used pointers which have had their memory
> released) which
> steps over the legal memory boundary... The exception message
> should read
> EAccessViolation and that's enough to identify an dangling
> pointer dereference.
Just want to add that accessing a blank string's elements will also cause
EAccessViolation, as in the code:
s: string;
begin
s := '';
s[1]; // EAccessViolation
This is because the 32-bit strings are handles as pointers to data and a
blank string is a Nil poiunter.
Regards,
Dennis.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz