Crash - access violation in TTeeCustomShapeBrushPen.Repaint

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

Crash - access violation in TTeeCustomShapeBrushPen.Repaint

Post by bgrande » Thu Dec 09, 2004 12:44 pm

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

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

Post by Marjan » Thu Dec 09, 2004 3:41 pm

Hi, Bernard.

Do you get this error with any particular series type ? Or do you get it with any particular charttool type ?
Marjan Slatinek,
http://www.steema.com

bgrande
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: Lille
Contact:

Post by bgrande » Fri Dec 10, 2004 7:15 am

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 :)

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 10, 2004 8:13 am

Hi,

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

bgrande
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: Lille
Contact:

Post by bgrande » Fri Dec 10, 2004 8:41 am

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 :-(

NREL
Newbie
Newbie
Posts: 10
Joined: Fri May 07, 2004 4:00 am

Post by NREL » Wed May 18, 2005 9:40 pm

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.

NREL
Newbie
Newbie
Posts: 10
Joined: Fri May 07, 2004 4:00 am

Post by NREL » Wed May 18, 2005 10:11 pm

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.

Post Reply