Form Designer: AV when trying to delete component with subcomponents
Original Reporter info from Mantis: Ask
-
Reporter name: Alexander S. Klenin
Original Reporter info from Mantis: Ask
- Reporter name: Alexander S. Klenin
Description:
See the stacktrace below. TChart.Destroy and TChart.GetChildren lines
come from DebugLn statements in the attached patch.
TChart.Destroy 94827D0
TChartSeriesList.Destroy
TBasicChartSeries.Destroy
TChart.GetChildren 94827D0
TryFreeComponent ERROR: "Chart1:TChart" Access violation
Stack trace:
$0040B9F4
$0066AAA6 TCOMPONENTWALKER__WALK, line 174 of componenttreeview.pas
$00A27977 TCHART__GETCHILDREN, line 1025 of tagraph.pas
$0066AB14 TCOMPONENTWALKER__WALK, line 182 of componenttreeview.pas
$0051D135 TWINCONTROL__GETCHILDREN, line 3784 of ./include/wincontrol.inc
$00418FCE TCUSTOMFORM__GETCHILDREN, line 897 of ./include/customform.inc
$0066C0A1 ADDCHILDREN, line 576 of componenttreeview.pas
$0066BEBE TCOMPONENTTREEVIEW__REBUILDCOMPONENTNODES, line 640 of componenttreeview.pas
$0066AE38 TCOMPONENTTREEVIEW__SETSELECTION, line 233 of componenttreeview.pas
$0064D5B5 TOBJECTINSPECTORDLG__REFRESHCOMPONENTTREESELECTION, line 4178 of objectinspector.pp
$0064D51B TOBJECTINSPECTORDLG__REFRESHSELECTION, line 4171 of objectinspector.pp
$0064D3E6 TOBJECTINSPECTORDLG__SETSELECTION, line 4147 of objectinspector.pp
$0079B4E5 TCUSTOMFORMEDITOR__SETSELECTION, line 928 of customformeditor.pp
$00453561 TMAINIDE__ONCONTROLSELECTIONCHANGED, line 12722 of main.pp
$00453272 TMAINIDE__ONDESIGNERPERSISTENTDELETED, line 12637 of main.pp
$00795AD2 TDESIGNER__DODELETEPERSISTENT, line 2535 of C:/lazarus/designer/designer.pp
$007960EB TDESIGNER__NOTIFICATION, line 2671 of C:/lazarus/designer/designer.pp
Steps to reproduce:
- Open components\tachart\demo\axis\axisdemo.lpr
- Select "Chart1" component in main form
- Either delete or cut it.
=>
AV
Additional information:
Note how TChart.GetChildren is called after TChart.Destroy
Mantis conversion info:
- Mantis ID: 16035
- Version: 0.9.29 (SVN)
- Monitored by: » etrusco (Flávio Etrusco)
- Target version: 1.0.0
- LazTarget: 1.0