Delphi 12.2 IDE pops up an "Invalid Pointer" error dialog when closing one of my projects. I spent an hour or so trying to find the culprit. It appears to be with the latest TMS update version 13.4.0.1 (5-Feb-2025). When I reinstalled the previous version 13.4.0.0 (15-Jan-2025), the "Invalid Pointer" error dialog no longer appeared when I closed my project.
Delphi's "Invalid Pointer" error dialog has a details link, which contained the following stack trace. I see some TMS references in the list (my project uses TAdvPageControl):
[5A07FFEC]{rtl290.bpl } System.TObject.FreeInstance (Line 18364, "System.pas" + 2) + $2
[5A07A4D2]{rtl290.bpl } System.ErrorAt (Line 5916, "System.pas" + 3) + $4
[5A07A516]{rtl290.bpl } System.Error (Line 5927, "System.pas" + 1) + $7
[5A07FFEC]{rtl290.bpl } System.TObject.FreeInstance (Line 18364, "System.pas" + 2) + $2
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[60F82DF9]{vcl290.bpl } Vcl.Graphics.TFont.Destroy (Line 2562, "Vcl.Graphics.pas" + 5) + $6
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[60F841F9]{vcl290.bpl } Vcl.Graphics.TCanvas.Destroy (Line 3924, "Vcl.Graphics.pas" + 4) + $3
[60FAB90C]{vcl290.bpl } Vcl.Controls.TControlCanvas.Destroy (Line 5542, "Vcl.Controls.pas" + 2) + $6
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[60FBB149]{vcl290.bpl } Vcl.Controls.TCustomControl.Destroy (Line 15209, "Vcl.Controls.pas" + 1) + $6
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[5A0C7F14]{rtl290.bpl } System.SysUtils.FreeAndNil (Line 28385, "System.SysUtils.pas" + 2) + $2
[207F25E1]{TMSVCLUIPackPkgDXE15.bpl} Advcustomcomponent.TAdvCustomComponent + $11
[209C483F]{TMSVCLUIPackPkgDXE15.bpl} Advpdfio.TAdvCustomPDFIO + $27
[60FB152E]{vcl290.bpl } Vcl.Controls.TWinControl.Destroy (Line 9318, "Vcl.Controls.pas" + 25) + $6
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[60FBB154]{vcl290.bpl } Vcl.Controls.TCustomControl.Destroy (Line 15210, "Vcl.Controls.pas" + 2) + $6
[20DB179C]{TMSVCLUIPackPkgDXE15.bpl} Advpagecontrol.TAdvTabSheet + $38
[60FB152E]{vcl290.bpl } Vcl.Controls.TWinControl.Destroy (Line 9318, "Vcl.Controls.pas" + 25) + $6
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[6101FBC9]{vcl290.bpl } Vcl.ComCtrls.TCustomTabControl.Destroy (Line 6014, "Vcl.ComCtrls.pas" + 5) + $6
[20DB238B]{TMSVCLUIPackPkgDXE15.bpl} Advpagecontrol.TAdvPageControl + $DF
[60FB152E]{vcl290.bpl } Vcl.Controls.TWinControl.Destroy (Line 9318, "Vcl.Controls.pas" + 25) + $6
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[60FBB154]{vcl290.bpl } Vcl.Controls.TCustomControl.Destroy (Line 15210, "Vcl.Controls.pas" + 2) + $6
[20DB179C]{TMSVCLUIPackPkgDXE15.bpl} Advpagecontrol.TAdvTabSheet + $38
[60FB152E]{vcl290.bpl } Vcl.Controls.TWinControl.Destroy (Line 9318, "Vcl.Controls.pas" + 25) + $6
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[6101FBC9]{vcl290.bpl } Vcl.ComCtrls.TCustomTabControl.Destroy (Line 6014, "Vcl.ComCtrls.pas" + 5) + $6
[20DB238B]{TMSVCLUIPackPkgDXE15.bpl} Advpagecontrol.TAdvPageControl + $DF
[60FB152E]{vcl290.bpl } Vcl.Controls.TWinControl.Destroy (Line 9318, "Vcl.Controls.pas" + 25) + $6
[5A0807B6]{rtl290.bpl } System.@ClassDestroy (Line 19728, "System.pas" + 0) + $2
[610F280F]{vcl290.bpl } Vcl.Forms.TScrollingWinControl.Destroy (Line 3433, "Vcl.Forms.pas" + 3) + $6
[610F74A5]{vcl290.bpl } Vcl.Forms.TCustomForm.Destroy (Line 5502, "Vcl.Forms.pas" + 31) + $A
[62360348]{designide290.bpl} Proxies.DestroyHook (Line 388, "Proxies.pas" + 2) + $6
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[74405DE2]{vcldesigner290.bpl} VCLFormDesigner.TVCLRootDesigner.FreeRoot (Line 581, "VCLFormDesigner.pas" + 0) + $2
[62394EDB]{designide290.bpl} ComponentDesigner.TComponentRoot.InternalDeinitializeDesigner (Line 5106, "ComponentDesigner.pas" + 24) + $B
[62397BB5]{designide290.bpl} ComponentDesigner.TComponentRoot.Close (Line 6050, "ComponentDesigner.pas" + 5) + $5
[590BAEBC]{delphicoreide290.bpl} DelphiModule.TPascalCodeMgrModHandler.Destroyed (Line 755, "DelphiModule.pas" + 11) + $5
[59806F49]{coreide290.bpl} DocModul.TCodeIDocModule.NotifyDestroyed (Line 2521, "DocModul.pas" + 2) + $5
[6237037C]{designide290.bpl} ToolUtils.ForEach (Line 124, "ToolUtils.pas" + 9) + $F
[59806EBA]{coreide290.bpl} DocModul.TCodeIDocModule.NotifyDestruction (Line 2505, "DocModul.pas" + 2) + $B
[59803DA0]{coreide290.bpl} DocModul.TDocModule.BeforeDestruction (Line 1065, "DocModul.pas" + 16) + $0
[5A080815]{rtl290.bpl } System.@BeforeDestruction (Line 19768, "System.pas" + 10) + $0
[595DBF5A]{coreide290.bpl} SourceModule.TSourceModule.Destroy (Line 441, "SourceModule.pas" + 0) + $2
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[598050BE]{coreide290.bpl} DocModul.WalkDependencies (Line 1713, "DocModul.pas" + 9) + $2
[59805109]{coreide290.bpl} DocModul.TDocModule.WalkDependencies (Line 1722, "DocModul.pas" + 1) + $1
[59804102]{coreide290.bpl} DocModul.TDocModule.Close (Line 1178, "DocModul.pas" + 13) + $F
[59542A65]{coreide290.bpl} ProjectModule.TBaseProject.BeforeDestruction (Line 1122, "ProjectModule.pas" + 37) + $6
[59026E21]{delphicoreide290.bpl} BaseDelphiProject.TBaseDelphiProject.BeforeDestruction (Line 4484, "BaseDelphiProject.pas" + 4) + $2
[5A080815]{rtl290.bpl } System.@BeforeDestruction (Line 19768, "System.pas" + 10) + $0
[59010A4F]{delphicoreide290.bpl} BaseDelphiProject.TBaseDelphiProject.Destroy (Line 988, "BaseDelphiProject.pas" + 0) + $3
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[594991C4]{coreide290.bpl} ProjectGroup.TProjectGroup.BeforeDestruction (Line 968, "ProjectGroup.pas" + 52) + $2
[5A080815]{rtl290.bpl } System.@BeforeDestruction (Line 19768, "System.pas" + 10) + $0
[59498F22]{coreide290.bpl} ProjectGroup.TProjectGroup.Destroy (Line 901, "ProjectGroup.pas" + 0) + $2
[5A0800E4]{rtl290.bpl } System.TObject.Free (Line 18427, "System.pas" + 1) + $4
[5949F90A]{coreide290.bpl} ProjectGroup.TProjectGroupWrapper.Close (Line 2848, "ProjectGroup.pas" + 2) + $5
[007B8281]{bds.exe } AppMain.TAppBuilder.DestroyProjectGroup + $1A9
[007B83DC]{bds.exe } AppMain.TAppBuilder.CloseProjectGroup + $54
[007B92CE]{bds.exe } AppMain.TAppBuilder.FileCloseAll + $A6
[5A1A400B]{rtl290.bpl } System.Classes.TBasicAction.Execute (Line 18584, "System.Classes.pas" + 3) + $7
[60F93752]{vcl290.bpl } Vcl.ActnList.TCustomAction.Execute (Line 284, "Vcl.ActnList.pas" + 19) + $35
[5A1A3DBD]{rtl290.bpl } System.Classes.TBasicActionLink.Execute (Line 18479, "System.Classes.pas" + 8) + $7
[74FB6879]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMenuBar.ExecAction (Line 1103, "Vcl.ActnMenus.pas" + 6) + $D
[74FB8138]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMenuBar.TrackMenu (Line 1873, "Vcl.ActnMenus.pas" + 19) + $15
[74FBBEB6]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMainMenuBar.TrackMenu (Line 3839, "Vcl.ActnMenus.pas" + 5) + $3
[74FB63F4]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMenuBar.CMItemClicked (Line 973, "Vcl.ActnMenus.pas" + 2) + $11
[74FB63FD]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMenuBar.CMItemClicked (Line 974, "Vcl.ActnMenus.pas" + 3) + $4
[60FAF15E]{vcl290.bpl } Vcl.Controls.TControl.WndProc (Line 7920, "Vcl.Controls.pas" + 91) + $6
[60FB4813]{vcl290.bpl } Vcl.Controls.TWinControl.WndProc (Line 11154, "Vcl.Controls.pas" + 178) + $6
[60FAED94]{vcl290.bpl } Vcl.Controls.TControl.Perform (Line 7698, "Vcl.Controls.pas" + 10) + $8
[60FB469F]{vcl290.bpl } Vcl.Controls.TWinControl.WndProc (Line 11102, "Vcl.Controls.pas" + 126) + $1D
[60FB4813]{vcl290.bpl } Vcl.Controls.TWinControl.WndProc (Line 11154, "Vcl.Controls.pas" + 178) + $6
[5A081090]{rtl290.bpl } System.TMonitor.TryEnter (Line 20364, "System.pas" + 10) + $0
[5A080BB0]{rtl290.bpl } System.TMonitor.Enter (Line 20025, "System.pas" + 4) + $2
[5A080A18]{rtl290.bpl } System.TMonitor.CheckOwningThread (Line 19939, "System.pas" + 2) + $0
[5A080D3E]{rtl290.bpl } System.TMonitor.Exit (Line 20129, "System.pas" + 1) + $2
[74FB8274]{vclactnband290.bpl} Vcl.ActnMenus.TCustomActionMenuBar.WndProc (Line 1917, "Vcl.ActnMenus.pas" + 25) + $4
[60FB3CD8]{vcl290.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 10823, "Vcl.Controls.pas" + 3) + $6
[5A1A4E3C]{rtl290.bpl } System.Classes.StdWndProc (Line 19091, "System.Classes.pas" + 8) + $0
[611047BB]{vcl290.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 13376, "Vcl.Forms.pas" + 23) + $1
[611047FE]{vcl290.bpl } Vcl.Forms.TApplication.HandleMessage (Line 13406, "Vcl.Forms.pas" + 1) + $4
[61104B3D]{vcl290.bpl } Vcl.Forms.TApplication.Run (Line 13545, "Vcl.Forms.pas" + 27) + $3
[00808B02]{bds.exe } bds.bds + $DE
On a side note, I have another computer with the same development setup (Delphi 12, 2, TMS VCL, etc.). On that other computer, which also popped up the "Invalid Pointer" dialog, its stack trace did NOT have any TMS references. But nonetheless, reinstalling the previous version 13.4.0.0 fixed the issue. (i.e., closing the project no longer popped up the "Invalid Pointer" dialog.)
I hope it's an easy bug fix at your end! If you need further info, let me know.
Steve V