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

AV on closing form which contains TChart and Report Builder 7.03

edited November 2003 in General
I have a MDI application in which reports are created on child forms and I
am using a custom print preview. This one report when it closes will
generate a AV when closing the preview window. I have traced it down to one
of two AV's. these errors do not always occur. I am using D5, RB 7.03 and
TeeChart 6.01. It seems that the errors occur more frequently on slower
machines.

once in a while I get an exception in the following code.

forms.pas
destructor TScrollingWinControl.Destroy;
begin
FHorzScrollBar.Free;
FVertScrollBar.Free;
inherited Destroy; <--- AV here
end;

or I get an exception in the following code.

TeEngine.pas
{ When this series is a datasource for other series,
this method tells the other series to remove the reference to itself. }
Procedure TChartSeries.RemoveAllLinkedSeries;
var t : Integer;
begin
if Assigned(FDataSources) then
for t:=0 to DataSources.Count-1 do
if Assigned(DataSources[t]) and
(TObject(DataSources[t]) is TChartSeries) then // 6.02, changed to
TObject
TChartSeries(DataSources[t]).RemoveLinkedSeries(Self); <----AV
here
end;

I have tried several different approaches to closing and freeing the child
forms but none seem to make any difference.

Any suggestions would be appreciated. I'm at a total loss.

Thanks in advance,
Rodger

Comments

  • edited November 2003
    Hi Rodger,

    I am unable to recreate this AV error. If possible, please send an example
    that demonstrates the error to support@digital-metaphors.com and I'll try to
    recreate it on my machine.

    --
    Best Regards,

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