Board index » delphi » Access Violation error message

Access Violation error message

Help!!!!!
I recently converted a project from Delphi 1.0 to 2.0. Now I FREQUENTLY
get the message "Access Violation at address **********" when running
my App and sometimes even when compiling/building.  I am stumped and
would appreciate any help that you could give.... ;)
P.S. The error message is unpredictable, and if I re-run it is often
gone the next time!
--
David Watson
Osprey Enterprises
109 Oakhurst Dr.
Hurst, TX  76053
(817) 282-3882

Email= osp...@flash.net

 

Re:Access Violation error message


It sounds like you're accessing an object after it's been destroyed.  This
will work if the OS hasn't re-allocated the memory.  If it does then
"Access Violation ..."

The main problem I have is with strings in D2 v D1.  For example:

s:= 'Hello';
if s[6]='!' then ....

in D1, this is OK, but in D2 you get an "Access Violation ...", in D2 use:
if (length(s)>5) and (s[6]='!') then ...

HTH,

--
Paul Motyer
paulm at pccity.com.au - now working!
Soft Stuff, Croydon, Australia, 3136

David Watson <osp...@flash.net> wrote in article
<335BDDBA.2...@flash.net>...

Quote
> Help!!!!!
> I recently converted a project from Delphi 1.0 to 2.0. Now I FREQUENTLY
> get the message "Access Violation at address **********" when running
> my App and sometimes even when compiling/building.  I am stumped and
> would appreciate any help that you could give.... ;)
> P.S. The error message is unpredictable, and if I re-run it is often
> gone the next time!
> --
> David Watson
> Osprey Enterprises
> 109 Oakhurst Dr.
> Hurst, TX  76053
> (817) 282-3882

> Email= osp...@flash.net

Other Threads