Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

tlmddock TLMDockPanelCloseAction: FastMM has detected an error during a free block scan operation.

Compile the Docking demo in 64 bit with FASTMM4 option:

program pDockingDemo;
{$I LmdCmps.inc}

uses
  FastMM4,
  Forms,
  d_MainFormUnit in 'd_MainFormUnit.pas' {frmMain};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
end.

Start the demo and click File->NewTextFile. Close the "TextFile1.txt" panel by clicking on the close button of the panel.
Now close the application.

FastMM will now report an error:
FastMM has detected an error during a free block scan operation. FastMM detected that a block has been modified after being freed. (error is attached).

The error is caused by the DocClose procedure. When procedure is called then CloseAction is caHide. Whenever modifying the CloseAction then FastMM reports the error.

procedure TfrmMain.DocClose(Sender: TObject; var CloseAction: TLMDockPanelCloseAction);
begin
  CloseAction := caFree;
end;

Comments

Sign In or Register to comment.