I am trying to diagnose a problem that occurs when I exit from my application. I am getting an Application exception : Invalid pointer operation. I was originally using TeeChart 8.07, but I upgraded to 8.08 to see if this would help... it did not.
The stack trace is attached as a jpeg.
I believe that the problem is related to the FreeAllSeries method. I have tried to with several different variations of the following:
BarChartSeries : array of TCustomBarSeries;
for i := Low(BarChartSeries) to High(BarChartSeries) do
begin
if(BarChartSeries <> nil) then
begin
// BarChartSeries.Clear();
// BarChartSeries.Destroy();
BarChartSeries.Free();
BarChartSeries := nil;
end;
end;
or this
ChartHMICBEMA: TChart;
for i := 0 to ChartHMICBEMA.SeriesCount - 1 do
begin
if(ChartHMICBEMA.Series <> nil) then
begin
ChartHMICBEMA.Series.Free();
end;
end;
ChartHMICBEMA.Free();
The result is that I get the invalid pointer operation during execution instead of on exit. Is either of these a correct alternative to FreeAllSeries()?
Thanks,
Kent
Application exception : Invalid pointer operation
Application exception : Invalid pointer operation
- Attachments
-
- snapshot of stack trace
- assertion_error.JPG (182.07 KiB) Viewed 2862 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Application exception : Invalid pointer operation
Hi Kent,
And RemoveSeries for a single series:
Or:
If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
It's much easier, try using RemoveAllSeries:The result is that I get the invalid pointer operation during execution instead of on exit. Is either of these a correct alternative to FreeAllSeries()?
Code: Select all
Chart1.RemoveAllSeries;
Code: Select all
Chart1.RemoveSeries(Series1);
Code: Select all
Chart1.RemoveSeries(0);
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |