- This topic has 1 reply, 2 voices, and was last updated 6 years, 6 months ago by Support.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
May 15, 2018 at 12:46 pm #37844HeDiBoParticipant
I have a TsDBText field with a BoundLabel property. When the program terminates I get the error from FastMM4 that a freed object had been used. The bug occurred in sCommonData.pas:
Code:destructor TsBoundLabel.Destroy; begin
if Assigned(FTheLabel) and not (csDestroying in FTheLabel.ComponentState) then
FreeAndNil(FTheLabel); // <<<--- throws the already freed exception. FreeAndNil(FFont);
inherited Destroy;
end;This is the stack trace leading up to this problem:
Code::750dd722 KERNELBASE.RaiseException + 0x62 FastMM4.TFreedObject.VirtualMethodError
System.TObject.Free
sCommonData.TsBoundLabel.Destroy
System.TObject.Free
sDBText.TsDBText.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.Controls.TCustomControl.Destroy
sPanel.TsCustomPanel.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.Controls.TCustomControl.Destroy
sPanel.TsCustomPanel.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.Forms.TScrollingWinControl.Destroy
frPoule.TfrPouleMembers.Destroy << This is the Destructor of my Frame
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TTabSheet.Destroy
sPageControl.TsTabSheet.Destroy << The tab sheet contains a frame
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TCustomTabControl.Destroy
Vcl.ComCtrls.TPageControl.Destroy
sPageControl.TsPageControl.Destroy << The page control contains the tab sheet above
Vcl.Controls.TWinControl.Destroy
Vcl.Controls.TCustomControl.Destroy
sPanel.TsCustomPanel.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TTabSheet.Destroy
sPageControl.TsTabSheet.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TCustomTabControl.Destroy
Vcl.ComCtrls.TPageControl.Destroy
sPageControl.TsPageControl.Destroy << There are many page controls in my project containing other page controls
Vcl.Controls.TWinControl.Destroy
Vcl.Controls.TCustomControl.Destroy
sPanel.TsCustomPanel.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.Forms.TScrollingWinControl.Destroy
Competition.TfrCompetition.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TTabSheet.Destroy
sPageControl.TsTabSheet.Destroy
Vcl.Controls.TWinControl.Destroy
Vcl.ComCtrls.TCustomTabControl.Destroy
Vcl.ComCtrls.TPageControl.Destroy
sPageControl.TsPageControl.Destroy << This is the master page control
Vcl.Controls.TWinControl.Destroy
Vcl.Forms.TScrollingWinControl.Destroy
Vcl.Forms.TCustomForm.Destroy
System.TObject.Free
System.Classes.TComponent.DestroyComponents
Vcl.Forms.DoneApplication
System.SysUtils.DoExitProc
System._Halt0WIP4.WIP4If I use a TsStickyLabel in stead, there's no problem
When searching for the cause of this bug I came up with this Resources used after Destroy It Had nothing to do with this bug, but still a useful finding, I think.
May 15, 2018 at 6:30 pm #57951SupportKeymasterThank you for a report, I will check it.
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.