Page 1 of 1

Crash - access violation in TTeeCustomShapeBrushPen.Repaint

Posted: Thu Dec 09, 2004 12:44 pm
by 8575582
Hi,
I am using teechart 6.0.1 and when i close my application sometimes i have this error.

Using Delphi 7, all my series are cleared and autopaint=false when i leave.

Someone have an idea ? Thanks a lot for your help :)

Bernard

Posted: Thu Dec 09, 2004 3:41 pm
by Marjan
Hi, Bernard.

Do you get this error with any particular series type ? Or do you get it with any particular charttool type ?

Posted: Fri Dec 10, 2004 7:15 am
by 8575582
Hi,
I have 4 charts on my forms (in differents tabs), using delphi 7 pro

One with 2 series of horizontal bar and a tooltip on theses series to display an hint

The three others with series of TLineSeries (number of theses series is dynamic), i use this kind of construction :
sthroughput := TLineSeries.Create(self);
throughput.ParentChart := chThroughput;
sthroughput.Title := AFIfInfo.name;
sthroughput.LineBrush := bsSolid;
sthroughput.LineHeight := 1;
sthroughput.LinePen.Visible := False;
sthroughput.Marks.ArrowLength := 8;
sthroughput.Marks.Visible := False;
sthroughput.ValueFormat := '######0.## Kbit/s';
sthroughput.Pointer.InflateMargins := False;
sthroughput.Pointer.Style := psCircle;
sthroughput.Pointer.Visible := False;
throughput.XValues.DateTime := True;
sthroughput.XValues.Name := 'X ';

The crash debug show me this :
TTeeCustomShapeBrushPen.Repaint <-last call before access violation
TMarksItems.Clear
TSeriesMarks.Clear
TChartSeries.ClearLists
TChartSeries.Clear
TChartSeries.Destroy

When I close the form I set all series autorepaint to false before clearing them.

All ideas are welcome :)

Posted: Fri Dec 10, 2004 8:13 am
by Pep
Hi,

have you tried to use the FreeAllSeries method when you close the app. ?

Posted: Fri Dec 10, 2004 8:41 am
by 8575582
I do not use the freeall because my dynamic series are attached to an other object wich contains other things
(i free them when i free the objects, there 3 charts for one object. The crash seems to appear after the destroy of the form, so the series are already cleared when error raise)

Oddly it appears when the the charts runs a long time. The debugger doesn' t stop when there is this crash so I can see the line when this error raises :-(

Posted: Wed May 18, 2005 9:40 pm
by 9337351
Seeing how old this posting is, I was wondering if there was ever a resolution to this problem. I am experiencing this same problem using TeeChart 7.04 and Delphi 7. I had no problems using TeeChart 5.02 and Delphi 6. Using TC7.04 and Delphi 7, when I close my application I get an access violation exception which I traced back to
TTeeCustomshapeBrushPen.Repaint. I have a Chart object that plots several series of XYZ points. I am not even sure how or why this method is being called.

Posted: Wed May 18, 2005 10:11 pm
by 9337351
FYI,
After reading the last suggestion, I did try the FreeAllSeries method instead of the SeriesList.Clear method and this appears to have solved the problem.