RemoveAllLinkedSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bert
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am
Location: Netherlands
Contact:

RemoveAllLinkedSeries

Post by Bert » Tue Feb 17, 2004 12:35 pm

Hello,

I have an application that generates an Access Violation:

-----------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method|Line|
-----------------------------------------------------------------------------
|006A86A2|Kruiden.exe|TeEngine.pas|TChartSeries RemoveAllLinkedSeries
|6311|
|006A8648|Kruiden.exe|TeEngine.pas|TChartSeries |RemoveAllLinkedSeries
|6308|
|006A76C9|Kruiden.exe|TeEngine.pas|TChartSeries |Destroy
|5832|
|006A769C|Kruiden.exe|TeEngine.pas|TChartSeries |Destroy
|5824|
|006BDD9F|Kruiden.exe|Series.pas |TCustomSeries|Destroy |992|
|00882856|Kruiden.exe|Kruiden.dpr | | |32|
|77F4C292|ntdll.dll | | |ZwSetInformationThread||
-----------------------------------------------------------------------------

There is nothing special in my code (as far as I can see).

Is this a known issue in TeeChart 6.01 (Delphi 7)?

Regards,
Bert

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Feb 17, 2004 9:25 pm

Hi, Bert.

When exactly does the error happen ? When you close the form with chat on it ? Or when you try to remove/free series ? Does it happen with TDBChart or TChart ? Is one of your series/function using another series as datasource ?
It's really hard to give you an exact answer without debugging the application. If possible, please send me a small sample application (sources only) as-is which I can test/debug here ? You can send it to marjan@steema.com email address.
Marjan Slatinek,
http://www.steema.com

Bert
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am
Location: Netherlands
Contact:

Post by Bert » Wed Feb 18, 2004 6:26 pm

Hello Marjan,

The error happens when I close my application, after the FormDestroy.

The component that I use is a TDBChart and none of my series is using another one as the datasource.

Design-time I have added 2 series to the chart. They are connected to a table that is in a master-detail relationship.
Every now and then when I close my application, I get an error. Until now I am unable to find a relation between what I am doing and the error. Sometimes I only open and close the application and get the error.

Run-time the user can add or remove series that are in the same table.
When I do that, it seems that the error always occurs.

This is my code for adding or removing a serie:

var
NewSerie : TLineSeries;
i : integer;
begin
if ANewState = cbsChecked then
begin
NewSerie := TLineSeries.Create(Self);
DBChartGrafiek.AddSeries(NewSerie);
NewSerie.DataSource := KruidenData.MetingenTable;
NewSerie.Title := cxCheckListBoxGrafiek.Items[AIndex].Text;
NewSerie.XValues.DateTime := True;
NewSerie.XValues.ValueSource := 'Datum';
NewSerie.YValues.ValueSource := cxCheckListBoxGrafiek.Items[AIndex].Text;
NewSerie.LinePen.Width := 2;
DBChartGrafiek.RefreshDataSet(KruidenData.MetingenTable, NewSerie);
end
else
begin
for i := 0 to DBChartGrafiek.SeriesCount - 1 do
if DBChartGrafiek.Series.Title = cxCheckListBoxGrafiek.Items[AIndex].Text then
begin
DBChartGrafiek.RemoveSeries(DBChartGrafiek.Series);
break;
end;
end;
end;

Because the official 6.01 release is almost one year old, I guessed and hoped that there was already an update that would solve my mysterious error messages.

Bert

Bert
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am
Location: Netherlands
Contact:

Post by Bert » Tue Feb 24, 2004 6:45 pm

I am removing parts from my application to create an example as small as possible to reproduce the problem, but it is not as easy as it sounds.

The set of components used in the application includes: QuantumGrid 4, NavBar, ExpressBar, NexusDB, FastReport and TeeChart 6.01.

It strikes me that the only error messages that I get are always about TeeChart!

How can I get the latest sources to try?

The TeeChart 6.01 sources are older than all other components that I use.

Bert

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Sat Mar 06, 2004 9:28 am

Hi, Bert.

Hm... Having a lot of different components is not a good thing it you want to debug/pinpoint the problem. Can you prepare a simple application with (standard) Delphi component which shows this problem ?

Looking at the error you reported - as a temporary solution - can you disconnect all series from datasources before you close the form ?
Marjan Slatinek,
http://www.steema.com

Bert
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am
Location: Netherlands
Contact:

Post by Bert » Wed Mar 17, 2004 10:22 pm

After removing as much from my application as I could to isolate the problem, I still didn't get much further.
At some point it seemed that removing the uses of some DevExpress components solved the problem.
But then ... an update of my database was engine released. This solved the problem. I have tested many times before posting this message, just to make sure.
The last suggestion to disconnect series and datasources had been done also but didn't make any difference.
Well, the updated database engine did the trick.

Post Reply