Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2026

Summary: AV when deleting TColumnHeaderBand from Header node at design time
Product: TeeGrid for Delphi Reporter: yeray alonso <yeray>
Component: GridAssignee: david berneda <david>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=21&t=16878
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2018-04-10 03:05:07 EDT
How to reproduce:

- Drag a TTeeGrid into a form
- In the "Structure" view, expand "TeeGrid1" and "Headers" to see the "0 - TColumnHeaderBand" element
- Delete the "0 - TColumnHeaderBand" element

You'll get an AV with the message:

Access violation at address 5005FD50 in module 'rtl250.bpl'. Read of address 00000098

With these details:

[5005FD50]{rtl250.bpl  } System.TObject.InheritsFrom (Line 17727, "System.pas" + 6) + $0
[50120899]{rtl250.bpl  } System.TypInfo.HasCustomAttribute (Line 2594, "System.TypInfo.pas" + 17) + $6A
[2DAC9226]{VCLTeeGrid25.bpl} Vcltee.Grid.TTeeGrid.GetHeader + $6
[5005FBA2]{rtl250.bpl  } System.@IsClass (Line 17430, "System.pas" + 1) + $8
[501629E9]{rtl250.bpl  } System.Classes.IsDefaultObjectProp (Line 12571, "System.Classes.pas" + 7) + $11
[50162ED9]{rtl250.bpl  } System.Classes.IsDefaultPropertyValue (Line 12704, "System.Classes.pas" + 27) + $9
[211CA2F4]{designide250.bpl} DesignEditors.TPropertyEditor.GetIsDefault (Line 1223, "DesignEditors.pas" + 61) + $14
[500A113A]{rtl250.bpl  } System.SysUtils.Supports (Line 26623, "System.SysUtils.pas" + 1) + $9
[213E151B]{vclide250.bpl} PropBox.TCustomPropListBox.DrawPropItem (Line 969, "PropBox.pas" + 199) + $5
[50ABEC4B]{vcl250.bpl  } Vcl.Graphics.TResourceManager.AssignResource (Line 1986, "Vcl.Graphics.pas" + 17) + $D
[213E1CE6]{vclide250.bpl} PropBox.TCustomPropListBox.CNDrawItem (Line 1183, "PropBox.pas" + 12) + $2E
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50AE9843]{vcl250.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10209, "Vcl.Controls.pas" + 166) + $6
[50B0E179]{vcl250.bpl  } Vcl.StdCtrls.TCustomListBox.WndProc (Line 7251, "Vcl.StdCtrls.pas" + 55) + $5
[50AE4898]{vcl250.bpl  } Vcl.Controls.TControl.Perform (Line 7116, "Vcl.Controls.pas" + 10) + $8
[50AE99A7]{vcl250.bpl  } Vcl.Controls.DoControlMsg (Line 10278, "Vcl.Controls.pas" + 12) + $11
[50AEA552]{vcl250.bpl  } Vcl.Controls.TWinControl.WMDrawItem (Line 10604, "Vcl.Controls.pas" + 1) + $8
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50AE98D6]{vcl250.bpl  } Vcl.Controls.TWinControl.DefaultHandler (Line 10237, "Vcl.Controls.pas" + 17) + $10
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[500605B7]{rtl250.bpl  } System.TMonitor.Exit (Line 18722, "System.pas" + 2) + $7
[50AC64AF]{vcl250.bpl  } Vcl.Graphics.FreeMemoryContexts (Line 7129, "Vcl.Graphics.pas" + 12) + $8
[50AE8E10]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9908, "Vcl.Controls.pas" + 3) + $6
[50AE8E25]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9911, "Vcl.Controls.pas" + 6) + $0
[50AE9843]{vcl250.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10209, "Vcl.Controls.pas" + 166) + $6
[50AE8E10]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9908, "Vcl.Controls.pas" + 3) + $6
[5016EBCC]{rtl250.bpl  } System.Classes.StdWndProc (Line 17408, "System.Classes.pas" + 11) + $2
[50AE9952]{vcl250.bpl  } Vcl.Controls.TWinControl.DefaultHandler (Line 10250, "Vcl.Controls.pas" + 30) + $19
[50AE9B58]{vcl250.bpl  } Vcl.Controls.TWinControl.PaintWindow (Line 10333, "Vcl.Controls.pas" + 9) + $6
[50AE9A0D]{vcl250.bpl  } Vcl.Controls.TWinControl.PaintHandler (Line 10293, "Vcl.Controls.pas" + 4) + $14
[50AEA1FC]{vcl250.bpl  } Vcl.Controls.TWinControl.WMPaint (Line 10494, "Vcl.Controls.pas" + 6) + $5
[50AE9952]{vcl250.bpl  } Vcl.Controls.TWinControl.DefaultHandler (Line 10250, "Vcl.Controls.pas" + 30) + $19
[50AE5780]{vcl250.bpl  } Vcl.Controls.TControl.WMWindowPosChanged (Line 7650, "Vcl.Controls.pas" + 1) + $6
[50B0E608]{vcl250.bpl  } Vcl.StdCtrls.TCustomListBox.WMPaint (Line 7436, "Vcl.StdCtrls.pas" + 6) + $6
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50C28469]{vcl250.bpl  } Vcl.Forms.TCustomForm.WndProc (Line 4572, "Vcl.Forms.pas" + 209) + $5
[50AE4898]{vcl250.bpl  } Vcl.Controls.TControl.Perform (Line 7116, "Vcl.Controls.pas" + 10) + $8
[50AEC781]{vcl250.bpl  } Vcl.Controls.TWinControl.CMInvalidate (Line 12246, "Vcl.Controls.pas" + 3) + $13
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50060884]{rtl250.bpl  } System.TMonitor.TryEnter (Line 18935, "System.pas" + 10) + $0
[500603D8]{rtl250.bpl  } System.TMonitor.Enter (Line 18596, "System.pas" + 4) + $2
[50060884]{rtl250.bpl  } System.TMonitor.TryEnter (Line 18935, "System.pas" + 10) + $0
[500603D8]{rtl250.bpl  } System.TMonitor.Enter (Line 18596, "System.pas" + 4) + $2
[50060258]{rtl250.bpl  } System.TMonitor.CheckOwningThread (Line 18510, "System.pas" + 2) + $0
[50060566]{rtl250.bpl  } System.TMonitor.Exit (Line 18700, "System.pas" + 1) + $2
[500605B7]{rtl250.bpl  } System.TMonitor.Exit (Line 18722, "System.pas" + 2) + $7
[50AC64AF]{vcl250.bpl  } Vcl.Graphics.FreeMemoryContexts (Line 7129, "Vcl.Graphics.pas" + 12) + $8
[50AE9843]{vcl250.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10209, "Vcl.Controls.pas" + 166) + $6
[50B0E179]{vcl250.bpl  } Vcl.StdCtrls.TCustomListBox.WndProc (Line 7251, "Vcl.StdCtrls.pas" + 55) + $5
[50AE8E10]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9908, "Vcl.Controls.pas" + 3) + $6
[5016EBCC]{rtl250.bpl  } System.Classes.StdWndProc (Line 17408, "System.Classes.pas" + 11) + $2
[50AEC809]{vcl250.bpl  } Vcl.Controls.TWinControl.Update (Line 12261, "Vcl.Controls.pas" + 1) + $12
[50AEC821]{vcl250.bpl  } Vcl.Controls.TWinControl.Repaint (Line 12267, "Vcl.Controls.pas" + 2) + $4
[50AE39B7]{vcl250.bpl  } Vcl.Controls.TControl.Refresh (Line 6579, "Vcl.Controls.pas" + 1) + $4
[213E0647]{vclide250.bpl} PropBox.TCustomPropListBox.ItemsChanged (Line 537, "PropBox.pas" + 3) + $2
[501563E9]{rtl250.bpl  } System.Classes.TStringList.Changing (Line 7030, "System.Classes.pas" + 1) + $0
[50156A5F]{rtl250.bpl  } System.Classes.TStringList.SetUpdateState (Line 7298, "System.Classes.pas" + 1) + $2
[50154991]{rtl250.bpl  } System.Classes.TStrings.GetUpdating (Line 6309, "System.Classes.pas" + 0) + $1
[213E1EC6]{vclide250.bpl} PropBox.TCustomPropListBox.Reset (Line 1247, "PropBox.pas" + 25) + $9
[213E8AC4]{vclide250.bpl} IDEInspListBox.TInspListBox.Reset (Line 1472, "IDEInspListBox.pas" + 3) + $2
[213E2827]{vclide250.bpl} PropBox.TCustomPropListBox.SetSelection (Line 1487, "PropBox.pas" + 3) + $4
[20995395]{coreide250.bpl} PropInsp.TPropertyInspector.Refresh (Line 1672, "PropInsp.pas" + 47) + $12
[20995734]{coreide250.bpl} PropInsp.TPropertyInspector.Modified (Line 1729, "PropInsp.pas" + 0) + $0
[208FA124]{coreide250.bpl} PropInspServices.TPropInspManager.NotifyModified (Line 81, "PropInspServices.pas" + 4) + $5
[211D7129]{designide250.bpl} ToolUtils.ForEach (Line 99, "ToolUtils.pas" + 5) + $F
[208FA085]{coreide250.bpl} PropInspServices.TPropInspManager.Modified (Line 58, "PropInspServices.pas" + 1) + $B
[208FA593]{coreide250.bpl} PropInspServices.TPropInspManager.SetSelection (Line 159, "PropInspServices.pas" + 10) + $2
[21F6C084]{delphicoreide250.bpl} PropInspManage.TDesignerPropSelection.UpdatePropertyList (Line 745, "PropInspManage.pas" + 43) + $18
[21F6B78D]{delphicoreide250.bpl} PropInspManage.TDesignerPropSelection.SelectionChanged (Line 598, "PropInspManage.pas" + 16) + $2
[2120B533]{designide250.bpl} ComponentDesigner.DesignNotificationSelectionChanged (Line 8832, "ComponentDesigner.pas" + 5) + $A
[21206B78]{designide250.bpl} ComponentDesigner.TComponentDesigner.SetSelection (Line 7021, "ComponentDesigner.pas" + 20) + $5
[212070FE]{designide250.bpl} ComponentDesigner.TComponentDesigner.UpdateSelections (Line 7089, "ComponentDesigner.pas" + 19) + $C
[21201E38]{designide250.bpl} ComponentDesigner.TComponentRoot.SelectionsChanged (Line 5427, "ComponentDesigner.pas" + 36) + $8
[21205223]{designide250.bpl} ComponentDesigner.TSelections.SelectionChanged (Line 6565, "ComponentDesigner.pas" + 1) + $E
[211C394E]{designide250.bpl} Designer.TSelectionListenerHelper.SelectionChanged (Line 2345, "Designer.pas" + 2) + $28
[211C3816]{designide250.bpl} Designer.TSimpleSelections.Modified (Line 2287, "Designer.pas" + 3) + $C
[211C3697]{designide250.bpl} Designer.TSimpleSelections.EndSelections (Line 2242, "Designer.pas" + 2) + $0
[211FCF6D]{designide250.bpl} ComponentDesigner.TComponentRoot.Select (Line 3760, "ComponentDesigner.pas" + 14) + $E
[21200F91]{designide250.bpl} ComponentDesigner.TComponentRoot.DeleteSelection (Line 5145, "ComponentDesigner.pas" + 50) + $22
[211E3027]{designide250.bpl} TreeIntf.TRootSprig.EditAction (Line 2130, "TreeIntf.pas" + 15) + $7
[211E69E0]{designide250.bpl} TreeIntf.TRootSprigStructureContext.EditAction (Line 4075, "TreeIntf.pas" + 2) + $6
[211E6ACB]{designide250.bpl} TreeIntf.TRootSprigStructureContext.KeyDown (Line 4101, "TreeIntf.pas" + 4) + $7
[500A113A]{rtl250.bpl  } System.SysUtils.Supports (Line 26623, "System.SysUtils.pas" + 1) + $9
[209C4ED6]{coreide250.bpl} StructureView.TStructureViewForm.VirtualStringTree1KeyDown (Line 1810, "StructureView.pas" + 8) + $15
[50AEB2CD]{vcl250.bpl  } Vcl.Controls.TWinControl.KeyDown (Line 11201, "Vcl.Controls.pas" + 1) + $1B
[50AEB362]{vcl250.bpl  } Vcl.Controls.TWinControl.DoKeyDown (Line 11232, "Vcl.Controls.pas" + 23) + $C
[50AEB392]{vcl250.bpl  } Vcl.Controls.TWinControl.WMKeyDown (Line 11242, "Vcl.Controls.pas" + 1) + $4
[2147C116]{vclide250.bpl} IDEVirtualTrees.TBaseVirtualTree.WMKeyDown (Line 16098, "IDEVirtualTrees.pas" + 2) + $4
[21488340]{vclide250.bpl} IDEVirtualTrees.TBaseVirtualTree.WndProc (Line 23760, "IDEVirtualTrees.pas" + 32) + $4
[50AE4898]{vcl250.bpl  } Vcl.Controls.TControl.Perform (Line 7116, "Vcl.Controls.pas" + 10) + $8
[50AEBDE8]{vcl250.bpl  } Vcl.Controls.TWinControl.CNKeyDown (Line 11884, "Vcl.Controls.pas" + 11) + $C
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50C33AD7]{vcl250.bpl  } Vcl.Forms.TApplication.DispatchAction (Line 11855, "Vcl.Forms.pas" + 9) + $C
[50AE4898]{vcl250.bpl  } Vcl.Controls.TControl.Perform (Line 7116, "Vcl.Controls.pas" + 10) + $8
[50C33AD7]{vcl250.bpl  } Vcl.Forms.TApplication.DispatchAction (Line 11855, "Vcl.Forms.pas" + 9) + $C
[50C3115D]{vcl250.bpl  } Vcl.Forms.TApplication.WndProc (Line 10202, "Vcl.Forms.pas" + 98) + $B
[5005FBA2]{rtl250.bpl  } System.@IsClass (Line 17430, "System.pas" + 1) + $8
[50AE4C5E]{vcl250.bpl  } Vcl.Controls.TControl.WndProc (Line 7338, "Vcl.Controls.pas" + 91) + $6
[50060884]{rtl250.bpl  } System.TMonitor.TryEnter (Line 18935, "System.pas" + 10) + $0
[500603D8]{rtl250.bpl  } System.TMonitor.Enter (Line 18596, "System.pas" + 4) + $2
[50060258]{rtl250.bpl  } System.TMonitor.CheckOwningThread (Line 18510, "System.pas" + 2) + $0
[50060566]{rtl250.bpl  } System.TMonitor.Exit (Line 18700, "System.pas" + 1) + $2
[500605B7]{rtl250.bpl  } System.TMonitor.Exit (Line 18722, "System.pas" + 2) + $7
[50AC64AF]{vcl250.bpl  } Vcl.Graphics.FreeMemoryContexts (Line 7129, "Vcl.Graphics.pas" + 12) + $8
[50AE8E10]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9908, "Vcl.Controls.pas" + 3) + $6
[50AE8E25]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9911, "Vcl.Controls.pas" + 6) + $0
[50AE9843]{vcl250.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10209, "Vcl.Controls.pas" + 166) + $6
[21488340]{vclide250.bpl} IDEVirtualTrees.TBaseVirtualTree.WndProc (Line 23760, "IDEVirtualTrees.pas" + 32) + $4
[50AE8E10]{vcl250.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9908, "Vcl.Controls.pas" + 3) + $6
[5016EBCC]{rtl250.bpl  } System.Classes.StdWndProc (Line 17408, "System.Classes.pas" + 11) + $2
[50C31E1F]{vcl250.bpl  } Vcl.Forms.TApplication.ProcessMessage (Line 10641, "Vcl.Forms.pas" + 23) + $1
[50C31E62]{vcl250.bpl  } Vcl.Forms.TApplication.HandleMessage (Line 10671, "Vcl.Forms.pas" + 1) + $4
[50C32195]{vcl250.bpl  } Vcl.Forms.TApplication.Run (Line 10809, "Vcl.Forms.pas" + 26) + $3
[005088F2]{bds.exe     } bds.bds (Line 212, "" + 7) + $7
Comment 1 david berneda 2023-11-21 09:25:47 EST
Cannot reproduce in v1.15
Comment 2 david berneda 2023-11-21 09:27:47 EST
AV happens when moving the mouse over object inspector or properties, not just by deleting the header.
Comment 3 david berneda 2023-11-21 10:52:59 EST
The Header component is mandatory and must not be deleted, as it provides the default formatting properties of grid columns and cells.

The alternative is to set its visibility to False:

TeeGrid1.Header.Visible:=False

Usually it corresponds to the Headers Item 0 :

TeeGrid1.Headers[0].Visible:=False

An internal mechanism has been added to avoid the Access Violation exception, so now when deleting the Header component at design-time, it simply re-appears again, it is always re-created.