Error: Control 'Chart1' has no parent window

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Rob
Newbie
Newbie
Posts: 1
Joined: Tue Oct 19, 2021 12:00 am

Error: Control 'Chart1' has no parent window

Post by Rob » Mon Aug 01, 2022 8:18 pm

I have an error using TChart with BarGraph and fastline.
Just add a graph to an empty form.
Add: Series1 = BarGraph
Add: Series2=Fastline (Datasource=Function Avergae) source Series1.
Render is GDI
Then Press <ALT>+F12 (show dfm) and you have the error

The error also occure at runtime in my application when closing the form. De prevent this error I Free the chart in the OnDestroy of the form.

Delphi 11.1
TeeChartPro v2022.34.220329 VCL

[5B7E261B]{vcl280.bpl } Vcl.Controls.InvalidControlOperation (Line 3397, "Vcl.Controls.pas" + 1) + $63
[5B7EB610]{vcl280.bpl } Vcl.Controls.TWinControl.CreateWnd (Line 9789, "Vcl.Controls.pas" + 14) + $7
[5B7EBC52]{vcl280.bpl } Vcl.Controls.TWinControl.CreateHandle (Line 9986, "Vcl.Controls.pas" + 3) + $4
[5B7F0168]{vcl280.bpl } Vcl.Controls.TWinControl.HandleNeeded (Line 12742, "Vcl.Controls.pas" + 4) + $4
[5B7E46B6]{vcl280.bpl } Vcl.Controls.TControlCanvas.CreateHandle (Line 5245, "Vcl.Controls.pas" + 32) + $6
[5B7C2EC1]{vcl280.bpl } Vcl.Graphics.TCanvas.RequiredState (Line 4285, "Vcl.Graphics.pas" + 6) + $4
[5B7C2DD9]{vcl280.bpl } Vcl.Graphics.TCanvas.GetHandle (Line 4237, "Vcl.Graphics.pas" + 2) + $B
[51DAF368]{Tee928.bpl } Vcltee.Tecanvas.TTeeCanvas3D.MoveTo + $10
[51E69A7C]{Tee928.bpl } Vcltee.Series.TFastLineSeries.Clear + $70
[51E17C08]{Tee928.bpl } Vcltee.Teengine.TChartSeries.EndUpdate + $6C
[51E17CC4]{Tee928.bpl } Vcltee.Teengine.TChartSeries.NotifyValue + $3C
[51E16FFA]{Tee928.bpl } Vcltee.Teengine.TChartSeries.Clear + $42
[51E11990]{Tee928.bpl } Vcltee.Teengine.TChartSeries + $84
[51E5D269]{Tee928.bpl } Vcltee.Series.TCustomBarSeries + $3D
[5005FE34]{rtl280.bpl } System.TObject.Free (Line 17989, "System.pas" + 1) + $4
[51E19841]{Tee928.bpl } Vcltee.Teengine.TCustomAxisPanel.FreeAllSeries + $45
[51E1915B]{Tee928.bpl } Vcltee.Teengine.TCustomAxisPanel + $17
[51E38367]{Tee928.bpl } Vcltee.Chart.TCustomChart + $6B
[5B7E9D72]{vcl280.bpl } Vcl.Controls.TWinControl.Destroy (Line 8811, "Vcl.Controls.pas" + 25) + $6
[5006050A]{rtl280.bpl } System.@ClassDestroy (Line 19294, "System.pas" + 0) + $2
[5B9204EF]{vcl280.bpl } Vcl.Forms.TScrollingWinControl.Destroy (Line 3344, "Vcl.Forms.pas" + 3) + $6
[5B921BA5]{vcl280.bpl } Vcl.Forms.TCustomForm.Destroy (Line 4112, "Vcl.Forms.pas" + 31) + $A
[20F38B38]{designide280.bpl} Proxies.DestroyHook (Line 281, "Proxies.pas" + 2) + $6
[5005FE34]{rtl280.bpl } System.TObject.Free (Line 17989, "System.pas" + 1) + $4
[5A3C50E6]{vcldesigner280.bpl} VCLFormDesigner.TVCLRootDesigner.FreeRoot (Line 581, "VCLFormDesigner.pas" + 0) + $2
[20F6FED3]{designide280.bpl} ComponentDesigner.TComponentRoot.InternalDeinitializeDesigner (Line 5044, "ComponentDesigner.pas" + 24) + $B
[20F72B95]{designide280.bpl} ComponentDesigner.TComponentRoot.Close (Line 5988, "ComponentDesigner.pas" + 5) + $5
[21CE6E68]{delphicoreide280.bpl} DelphiModule.TPascalCodeMgrModHandler.Destroyed (Line 753, "DelphiModule.pas" + 11) + $5
[207BE0DD]{coreide280.bpl} DocModul.TCodeIDocModule.NotifyDestroyed (Line 2468, "DocModul.pas" + 2) + $5
[20F4B7FB]{designide280.bpl} ToolUtils.ForEach (Line 116, "ToolUtils.pas" + 9) + $F
[207BE04E]{coreide280.bpl} DocModul.TCodeIDocModule.NotifyDestruction (Line 2452, "DocModul.pas" + 2) + $B
[207BAFB8]{coreide280.bpl} DocModul.TDocModule.BeforeDestruction (Line 1022, "DocModul.pas" + 16) + $0
[50060569]{rtl280.bpl } System.@BeforeDestruction (Line 19334, "System.pas" + 10) + $0
[205E2C6A]{coreide280.bpl} SourceModule.TSourceModule.Destroy (Line 439, "SourceModule.pas" + 0) + $2
[5005FE34]{rtl280.bpl } System.TObject.Free (Line 17989, "System.pas" + 1) + $4
[207BC256]{coreide280.bpl} DocModul.WalkDependencies (Line 1660, "DocModul.pas" + 9) + $2
[207BC2A1]{coreide280.bpl} DocModul.TDocModule.WalkDependencies (Line 1669, "DocModul.pas" + 1) + $1
[207BB31A]{coreide280.bpl} DocModul.TDocModule.Close (Line 1135, "DocModul.pas" + 13) + $F
[21CED774]{delphicoreide280.bpl} DelphiModule.TPascalCodeMgrModHandler.SwapSourceFormView (Line 2944, "DelphiModule.pas" + 204) + $A
[207BD788]{coreide280.bpl} DocModul.TCodeIDocModule.SwapSourceFormView (Line 2222, "DocModul.pas" + 2) + $32
[21D73070]{delphicoreide280.bpl} PasCppCmds.TPasCppCommands.ViewSwapSourceFormCommandExecute (Line 365, "PasCppCmds.pas" + 5) + $5
[50173BF7]{rtl280.bpl } System.Classes.TBasicAction.Execute (Line 17866, "System.Classes.pas" + 3) + $7
[5B7CF9FE]{vcl280.bpl } Vcl.ActnList.TCustomAction.Execute (Line 284, "Vcl.ActnList.pas" + 19) + $35
[50173A4B]{rtl280.bpl } System.Classes.TBasicActionLink.Execute (Line 17777, "System.Classes.pas" + 2) + $7
[5B90EDC7]{vcl280.bpl } Vcl.Menus.TMenuItem.Click (Line 2617, "Vcl.Menus.pas" + 17) + $7
[5B910ACF]{vcl280.bpl } Vcl.Menus.DoClick (Line 3843, "Vcl.Menus.pas" + 41) + $4
[5B910BBB]{vcl280.bpl } Vcl.Menus.TMenu.IsShortCut (Line 3896, "Vcl.Menus.pas" + 38) + $6
[004A8909]{bds.exe } AppMain.TAppBuilder.FormShortCut (Line 5456, "AppMain.pas" + 2) + $C
[5B928FF8]{vcl280.bpl } Vcl.Forms.TCustomForm.IsShortCut (Line 8236, "Vcl.Forms.pas" + 2) + $16
[5B92D4BE]{vcl280.bpl } Vcl.Forms.TApplication.IsShortCut (Line 11273, "Vcl.Forms.pas" + 3) + $27
[5B92CA76]{vcl280.bpl } Vcl.Forms.TApplication.WndProc (Line 10891, "Vcl.Forms.pas" + 120) + $6
[6B0A5B27]{vclactnband280.bpl} Vcl.ActnMenus.CallWindowHook (Line 762, "Vcl.ActnMenus.pas" + 20) + $F
[50174A30]{rtl280.bpl } System.Classes.StdWndProc (Line 18375, "System.Classes.pas" + 8) + $0
[5B7E2848]{vcl280.bpl } Vcl.Controls.SendAppMessage (Line 3769, "Vcl.Controls.pas" + 2) + $4
[5B7EF48D]{vcl280.bpl } Vcl.Controls.TWinControl.IsMenuKey (Line 12260, "Vcl.Controls.pas" + 16) + $C
[5B7EF641]{vcl280.bpl } Vcl.Controls.TWinControl.CNSysKeyDown (Line 12329, "Vcl.Controls.pas" + 4) + $4
[5B7E7D62]{vcl280.bpl } Vcl.Controls.TControl.WndProc (Line 7548, "Vcl.Controls.pas" + 91) + $6
[20F91DEA]{designide280.bpl} DeskUtil.SetFocusHook (Line 462, "DeskUtil.pas" + 4) + $C
[5B8EDD6A]{vcl280.bpl } Vcl.Themes.TStyleManager.IsCustomStyleAvailable (Line 5820, "Vcl.Themes.pas" + 1) + $0
[5B7E98F7]{vcl280.bpl } Vcl.Controls.TControl.IsCustomStyleActive (Line 8596, "Vcl.Controls.pas" + 8) + $15
[5B7ECE79]{vcl280.bpl } Vcl.Controls.TWinControl.WndProc (Line 10583, "Vcl.Controls.pas" + 170) + $6
[5B9234C8]{vcl280.bpl } Vcl.Forms.TCustomForm.WndProc (Line 4979, "Vcl.Forms.pas" + 222) + $5
[5B9234E0]{vcl280.bpl } Vcl.Forms.TCustomForm.WndProc (Line 4980, "Vcl.Forms.pas" + 223) + $13
[5A3BD415]{vcldesigner280.bpl} VCLFormContainer.TControlSizer.ControlWndProc (Line 358, "VCLFormContainer.pas" + 33) + $C
[5B7EC3F4]{vcl280.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 10271, "Vcl.Controls.pas" + 3) + $6
[50174A30]{rtl280.bpl } System.Classes.StdWndProc (Line 18375, "System.Classes.pas" + 8) + $0
[5B92D3C8]{vcl280.bpl } Vcl.Forms.TApplication.IsKeyMsg (Line 11244, "Vcl.Forms.pas" + 25) + $12
[5B92D462]{vcl280.bpl } Vcl.Forms.TApplication.IsHintMsg (Line 11265, "Vcl.Forms.pas" + 3) + $2
[5B92D673]{vcl280.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 11330, "Vcl.Forms.pas" + 17) + $31
[5B92D6DA]{vcl280.bpl } Vcl.Forms.TApplication.HandleMessage (Line 11366, "Vcl.Forms.pas" + 1) + $4
[5B92DA19]{vcl280.bpl } Vcl.Forms.TApplication.Run (Line 11505, "Vcl.Forms.pas" + 27) + $3
[004F7FA2]{bds.exe } bds.bds (Line 227, "" + 16) + $2

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Error: Control 'Chart1' has no parent window

Post by Marc » Mon Aug 08, 2022 10:13 am

Hello,

I can't reproduce this problem straight-off. I created a new VCL Forms project in RAD Studio 11 using TeeChart v2022.34.220329 and added a Bar and FastLine Series using the Editor. I then set the Fastline datasource to Function:Average and the source as Series1.

I ran the project and it compiled, ran and closed correctly when required.

Please check that you don't have any old TeeChart source linked somewhere on the search path. If in doubt please send us an example project that reproduces the problem and we'll take a look.

Regards,
Marc Meumann
Steema Support

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Error: Control 'Chart1' has no parent window

Post by Yeray » Thu Sep 01, 2022 8:13 am

Hello,

I've been able to reproduce the problem so I've added it to the public tracker (#2546) and I've fixed it for the next maintenance release.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply