Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

AV in the ppComm

edited January 2004 in General
Hi,
I have RBuilder 7.03 with Delphi 5. I have some very complicated reports
and every
so often I get an AV error in the destroy. It is not all the time. It
seemed to happen
when I run the report, edit it, run it some more a number of times.

I put a try/except in and stumbled on the fact that in next time it came up
it was refering
to FNotifyList in the ppComm unit. I searched through that unit and the
only thing I
found was in the destroy. It frees the list but does not nil them. With
nothing to loose,
I added the nil statment for that and the other list that was not being set
to nil. This
seemed to have eliminated the problem for me. Like I said, I'm not sure why
this
would fix it and I am not 100% sure it has fixed anything but it has not
come up since
and I cannot think of a good reason not to set these to nil at this point is
the destroy.

Here is ther routine with ny change

destructor TppCommunicator.Destroy;
begin

SendNotify(Self, ppopRemove);

FNotifyList.Free;
FEventNotifyList.Free;

FNotifyList:=nil; // ADDED THIS
FEventNotifyList:=nil; // ADDED THIS

inherited Destroy;

end; {destructor, Destroy}


Can you think of any reason this would be a problem.
Thanks,

Joseph Gordon

Comments

  • edited January 2004
    Hi Joseph,

    Though I have not seen this error before, I do not see a problem with adding
    this code to the destroy method. It is probably a good idea to do so
    anyway. Thanks for pointing this out. I'll add this in the next release.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.