Board index » delphi » EAccessViolation

EAccessViolation

I am getting the following error message at runtime:  "...raised exception
class EAccessViolation...Read of address FFFFFFFF'.

I suspect the error is related to opening a table, however, I have checked
all my Table objects and test activated them in design mode to make sure
that they are valid along with the field definitions.  I get the error in a
OnMouseMove event when attempting to drag and drop from one Outline object
to another.  The error occurs as soon as I click and drag even before I
leave the 1st outline and enter the other, not to mention dropping (letting
go of the mouse button).

The module was originally compiled in Delphi 1, and I have moved it to
Delphi 3 with minor changes (syntax that the D1 compiler missed).

Please help if you have any ideas.

Below is the event handler (crash stops right at the end statement):
procedure TAssignService.AvailableOutlineMouseMove(Sender : TObject;
  Shift : TShiftState; X, Y : Integer);
begin
  if (Shift = [ssLeft]) and
     not AvailableOutline.Items[AvailableOutline.SelectedItem].HasItems then
    AvailableOutline.BeginDrag(False);
end;

roger_f...@compuserve.com

 

Re:EAccessViolation


I had seen the same message when porting a Delphi 1 program to Delphi 2.
After some debugging, I found that it always, in my case, resulted in
trying to access an object instance which had either never been Create-d,
or which had been Free-d, usually in some other part of the program. Check
to make sure that all object variables have been instantiated and not
destroyed.

I have never had this error arise in association with a table, but I can't
say that it isn't possible.

Hope that this helps.

Roger Fang <roger_f...@compuserve.com> wrote in article
<6l4kvl$p...@forums.borland.com>...

Quote
> I am getting the following error message at runtime:  "...raised
exception
> class EAccessViolation...Read of address FFFFFFFF'.

Re:EAccessViolation


I had the error occur in another event, but fixed it by correcting a table
field object (a table field type had been changed).

Thanks for the help.  I'll verify all my object instances.  I have some
which are no longer being used but I thought I commented out all references
to them.

Quote
Jeffrey Eib wrote in message <01bd8f58$df9945e0$d8fecc98@jeffreys>...
>I had seen the same message when porting a Delphi 1 program to Delphi 2.
>After some debugging, I found that it always, in my case, resulted in
>trying to access an object instance which had either never been Create-d,
>or which had been Free-d, usually in some other part of the program. Check
>to make sure that all object variables have been instantiated and not
>destroyed.

>I have never had this error arise in association with a table, but I can't
>say that it isn't possible.

>Hope that this helps.

>Roger Fang <roger_f...@compuserve.com> wrote in article
><6l4kvl$p...@forums.borland.com>...
>> I am getting the following error message at runtime:  "...raised
>exception
>> class EAccessViolation...Read of address FFFFFFFF'.

Other Threads