Access Violation freeing TeeChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Steffen Friismose
Newbie
Newbie
Posts: 5
Joined: Fri Jul 02, 2004 4:00 am
Location: Denmark
Contact:

Access Violation freeing TeeChart

Post by Steffen Friismose » Thu Jan 26, 2006 8:30 am

Using: Delphi 2005 (All patches), TeeChart 7.05, Win32

We get the exception below (From madExcept) when closing a form than contains a TeeChart. It is not 100% consistent, but we use it for rendering reports, so it happens at least in 50% of the cases.
It looks a lot like a memory problem, freeing or accessing an object already freed.

Any help is appreciated

Best Regards
Steffen
_____________________

date/time : 2006-01-25 12:08
computer name : NT6177BB
user name : Steffenf
operating system : Windows XP Service Pack 2 build 2600
system language : Danish
system up time : 3 days 14 hours
program up time : 6 minutes 12 seconds
processor : Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
physical memory : 23/447 MB (free/total)
free disk space : (C:) 3,82 GB (D:) 17,86 GB
display mode : 1024x768, 32 bit
process id : $fbc
command line : "D:\source\faelles\ras\programs\devel\main\Service\RASFormApp.exe" LOG
executable : RASFormApp.exe
exec. date/time : 2006-01-25 12:02
version : 1.0.3.123
madExcept version : 2.7e
exception class : EAccessViolation
exception message : Access violation at address 0040416C in module 'RASFormApp.exe'. Read of address 01CC7E88.

thread $d68 (TRenderThread):
0040416c RASFormApp.exe System @IsClass
00750e95 RASFormApp.exe TeEngine 7290 +3 TChartSeries.RemoveAllLinkedSeries
007502be RASFormApp.exe TeEngine 6756 +3 TChartSeries.Removed
007565fc RASFormApp.exe TeEngine 10700 +8 TCustomAxisPanel.RemoveSeries
007565c7 RASFormApp.exe TeEngine 10687 +1 TCustomAxisPanel.RemoveSeries
0075040f RASFormApp.exe TeEngine 6813 +3 TChartSeries.SetParentChart
0077e001 RASFormApp.exe Series 2758 +1 TCustomBarSeries.SetParentChart
00754cc6 RASFormApp.exe TeEngine 9802 +7 TCustomAxisPanel.FreeAllSeries
00754838 RASFormApp.exe TeEngine 9636 +1 TCustomAxisPanel.Destroy
00770834 RASFormApp.exe Chart 1701 +9 TCustomChart.Destroy
00787826 RASFormApp.exe ppChrtDP 264 +2 TppCustomDBChart.Destroy
00788636 RASFormApp.exe ppChrtDP 1208 +7 TppDPTeeChartControl.Destroy
004525d3 RASFormApp.exe Classes TComponent.DestroyComponents
004523d3 RASFormApp.exe Classes TComponent.Destroy
00535e29 RASFormApp.exe ppComm 469 +7 TppCommunicator.Destroy
005390bb RASFormApp.exe ppRelatv 165 +10 TppRelative.Destroy
005467f1 RASFormApp.exe ppPrnabl 835 +10 TppPrintable.Destroy
005a7b49 RASFormApp.exe ppClass 8890 +14 TppComponent.Destroy
0057b342 RASFormApp.exe ppCtrls 1388 +2 TppCustomComponent.Destroy
00785e89 RASFormApp.exe ppChrt 325 +5 TppCustomTeeChart.Destroy
007881f0 RASFormApp.exe ppChrtDP 724 +8 TppDPTeeChart.Destroy
004525d3 RASFormApp.exe Classes TComponent.DestroyComponents
004523d3 RASFormApp.exe Classes TComponent.Destroy
0045362e RASFormApp.exe Classes TDataModule.Destroy
007ed205 RASFormApp.exe ReportDesignerDataModule 177 +3 TReportDesignerModule.Destroy
00403fdc RASFormApp.exe System TObject.Free
007ef506 RASFormApp.exe ReportExplorerDataModule 67 +1 TReportExplorerModule.Destroy
00403fdc RASFormApp.exe System TObject.Free
008e6ae0 RASFormApp.exe JobContractor 62 +19 TJobContractor.Execute
008e6f67 RASFormApp.exe RenderThread 58 +11 TRenderThread.Execute
0042c10e RASFormApp.exe madExcept HookedTThreadExecute
00451ccc RASFormApp.exe Classes ThreadProc
00404ec0 RASFormApp.exe System ThreadWrapper
0042c0a3 RASFormApp.exe madExcept ThreadExceptFrame
>> created by main thread ($148) at:
004fcb08 RASFormApp.exe ServiceThread 32 +1 TServiceThread.Create

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

Post by Pep » Mon Jan 30, 2006 9:06 am

Hi Steffen,

It's hard to tell without debugging the application. Perhaps it would be a
good idea to check all the forms with TChart before you close main form
and manually free all chart series (using FreeAllSeries) :

Chart1.FreeAllSeries(nil);

Post Reply