After deleting an object generate errors

Hello,
we use tscripter only for editing Forms with TIDEFormDesigner. Like in the Demo, we generate the toolbar, inspector and componentcombobox. Sometimes after we delete objects from the form, we get some errors:

==============================================================================
= 29.10.2021 13:13:53 =

There was an error during the execution of this program.
The application might become unstable and even useless.
It's recommended that you save your work and close this application.

Zugriffsverletzung bei Adresse 009E905C in Modul 'KVis.exe'. Lesen von Adresse 00000000.


Exception log with detailed tech info. Generated on 29.10.2021 13:13:53.
You may send it to the application vendor, helping him to understand what had happened.
Application title: Visusystem
Application file:

Exception class: EAccessViolation
Exception message: Zugriffsverletzung bei Adresse 009E905C in Modul 'KVis.exe'. Lesen von Adresse 00000000.
Exception address: 009E905C

Main thread ID = 1932
Exception thread ID = 1932
GDI:436 Max GDI:538 User:846 Max User:855 HandleCount:611

Exception stack
Stack list, generated 29.10.2021 13:13:53
(005E805C){KVis.exe } [009E905C] PropertyList.TProperty.GetPropType (Line 1212, "PropertyList.pas" + 10) + $8
(005E7FFC){KVis.exe } [009E8FFC] PropertyList.TProperty.GetPropType (Line 1203, "PropertyList.pas" + 1) + $3
(005E838F){KVis.exe } [009E938F] PropertyList.TProperty.GetTypeKind (Line 1295, "PropertyList.pas" + 10) + $3
(00688E1D){KVis.exe } [00A89E1D] ComponentInspector.TAdvCustomComponentInspector.GetExpandState (Line 1737, "componentinspector.pas" + 6) + $3
(0067645C){KVis.exe } [00A7745C] InspectorControls.TAdvCustomInspector.DrawPropertyNameDefault (Line 2777, "inspectorcontrols.pas" + 1) + $8
(00156567){KVis.exe } [00557567] Vcl.Graphics.TResourceManager.AssignResource (Line 1988, "Vcl.Graphics.pas" + 17) + $D
(001579DF){KVis.exe } [005589DF] Vcl.Graphics.TBrush.SetColor (Line 3439, "Vcl.Graphics.pas" + 1) + $A
(006763AC){KVis.exe } [00A773AC] InspectorControls.TAdvCustomInspector.DrawPropertyName (Line 2753, "inspectorcontrols.pas" + 4) + $D
(00675B4A){KVis.exe } [00A76B4A] InspectorControls.TAdvCustomInspector.WndProc (Line 2583, "inspectorcontrols.pas" + 287) + $18

We use Delphi 10.3 and the newest Tscripter.

Hard to tell without any source code, especially this is a custom code from you, not from scripter. Are you using TIDEEngine? How are you connecting the components (form designer, inspector...)? Can this be easily reproducible in a small sample project?

Hello,
yes we use TIDEEngine, Formdesigner and Inspector. I will try to create a small project. It seems that the error happens when the inspector refresh the property-list.

Exception class: EAccessViolation
Exception message: Zugriffsverletzung bei Adresse 009ECD02 in Modul 'KVis.exe'. Lesen von Adresse 00000001.
Exception address: 009ECD02

Main thread ID = 6292
Exception thread ID = 6292
GDI:168 Max GDI:232 User:535 Max User:537 HandleCount:570

Exception stack
Stack list, generated 29.10.2021 14:40:45
(005EBD02){KVis.exe } [009ECD02] PropertyList.TPropertyList.Update (Line 2489, "PropertyList.pas" + 2) + $F
(00099A40){KVis.exe } [0049AA40] System.Classes.TObservers.IsObserving (Line 20124, "System.Classes.pas" + 11) + $20
(001AF623){KVis.exe } [005B0623] Vcl.StdCtrls.TCustomCombo.WndProc (Line 4425, "Vcl.StdCtrls.pas" + 70) + $4
(0000D68C){KVis.exe } [0040E68C] System.@FinalizeArray (Line 32812, "System.pas" + 144) + $0
(005EB7FD){KVis.exe } [009EC7FD] PropertyList.TPropertyList.Clear (Line 2371, "PropertyList.pas" + 2) + $8
(005EBCEE){KVis.exe } [009ECCEE] PropertyList.TPropertyList.Update (Line 2488, "PropertyList.pas" + 1) + $3
(005EB7B5){KVis.exe } [009EC7B5] PropertyList.TPropertyList.SetInstance (Line 2362, "PropertyList.pas" + 4) + $5
(005E9993){KVis.exe } [009EA993] PropertyList.TProperty.Create (Line 1858, "PropertyList.pas" + 15) + $22
(006869B8){KVis.exe } [00A879B8] ComponentInspector.TCompInspProperty.CreateWithOwner (Line 907, "componentinspector.pas" + 2) + $18
(00686AE2){KVis.exe } [00A87AE2] ComponentInspector.TCompInspPropertyList.CreateProperty (Line 934, "componentinspector.pas" + 1) + $27
(005EBB9B){KVis.exe } [009ECB9B] PropertyList.EnumProperties (Line 2463, "PropertyList.pas" + 11) + $13
(0007BAD2){KVis.exe } [0047CAD2] System.Classes.TList.SetCapacity (Line 5074, "System.Classes.pas" + 5) + $F
(005EBD14){KVis.exe } [009ECD14] PropertyList.TPropertyList.Update (Line 2491, "PropertyList.pas" + 4) + $7
(00687CC4){KVis.exe } [00A88CC4] ComponentInspector.TAdvCustomComponentInspector.RefreshList (Line 1385, "componentinspector.pas" + 5) + $25
(006B4EBE){KVis.exe } [00AB5EBE] IDEMain.TIDEInspector.Update (Line 3986, "idemain.pas" + 2) + $3
(00687924){KVis.exe } [00A88924] ComponentInspector.TAdvCustomComponentInspector.UpdateList (Line 1303, "componentinspector.pas" + 2) + $5
(006875E8){KVis.exe } [00A885E8] ComponentInspector.TAdvCustomComponentInspector.SetRoot (Line 1212, "componentinspector.pas" + 2) + $F
(006B5B6C){KVis.exe } [00AB6B6C] IDEMain.TIDEEngine.DesignerSelectionChange (Line 4235, "idemain.pas" + 9) + $15
(006A18FF){KVis.exe } [00AA28FF] FormDesigner.TAdvCustomFormDesigner.DoSelectionChange (Line 8151, "FormDesigner.pas" + 1) + $F
(006B42B7){KVis.exe } [00AB52B7] IDEMain.TIDEFormDesigner.DoSelectionChange (Line 3692, "idemain.pas" + 5) + $8
(0069C886){KVis.exe } [00A9D886] FormDesigner.TAdvCustomFormDesigner.DeleteControl (Line 6422, "FormDesigner.pas" + 23) + $5

I guess we will need that, thanks, to proper debug it. Probably it's accessing some property that has been already destroyed, so either our code, or your code, it's not properly cleaning up references to the destroyed object.