Access violation freeing report object
We have been chasing down an access violation in your source code when
freeing a report with a subreport connected to another subreport. The
access violations are sporatic. We noticed that you often free objects but
do not nil them, therefore we finally fixed the problem by using the
FreeAndNil() procedure whereever you used a free and not a nil immediately
following in the ppComm.pas and ppClass.pas files . This seems to have fixed
the problem. Could you please make this change permanent in a future
release of report builder. I believe you may find it fixes many strange
access violations people are reporting in your newsgroups.
Thanks,
Daniel Schipper
freeing a report with a subreport connected to another subreport. The
access violations are sporatic. We noticed that you often free objects but
do not nil them, therefore we finally fixed the problem by using the
FreeAndNil() procedure whereever you used a free and not a nil immediately
following in the ppComm.pas and ppClass.pas files . This seems to have fixed
the problem. Could you please make this change permanent in a future
release of report builder. I believe you may find it fixes many strange
access violations people are reporting in your newsgroups.
Thanks,
Daniel Schipper
This discussion has been closed.
Comments
Thanks for the information. Please send the changes you've made to
support@digital-metaphors.com and I will test and make sure they are added
to the next release.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
violations have decreased significantly, but we only converted those 2 units
from the .Free to the FreeAndNil. Do you intend to update all other source
code units to the FreeAndNil method, because there is probably something
else that is still not being nil-ed?
I sent the changes we made to support.
Thanks,
Dan
During the development process of ReportBuilder it is always an ongoing task
to find and fix these kinds of issues. We are currently converting all of
our code to work with Delphi 8 so there is a good chance that if we are
aware of this, we might be able to find a few more places where the problem
can be fixed. Thanks for your help.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com