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
RemoveAllLinkedSeries
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.
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
http://www.steema.com
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
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
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
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
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 ?
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
http://www.steema.com
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.
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.