I created a very simple test app with a single query, code is like this:
Code: Select all
var
q: TSQLQuery;
begin
q := TSQLQuery.Create(nil);
try
q.SQLConnection := SQLConnection1;
q.SQL.Text := 'select datum from route';
q.Open;
while not q.Eof do begin
if q.Fields[0].IsNull then
q := q; // dummy
q.Next;
end;
finally
q.Free;
end;
end;
Code: Select all
FastMM has detected an error during a FreeMem operation. The block footer has been corrupted.
The block size is: 4
This block was allocated by thread 0x6D8, and the stack trace (return addresses) at the time was:
40ACB6 [FastMM4.pas][FastMM4][DebugAllocMem][6617]
40315A [sys\system.pas][System][AllocMem][2552]
48718F [DB.pas][DB][TDataSet.GetFieldData][9627]
47C3C2 [DB.pas][DB][TField.GetData][3873]
47C5BE [DB.pas][DB][TField.GetIsNull][3980]
44A68A [Controls.pas][Controls][TControl.Click][5229]
...
The block is currently used for an object of class: Unknown
The allocation number is: 7352
The block was previously freed by thread 0x6D8, and the stack trace (return addresses) at the time was:
40318E [sys\system.pas][System][@FreeMem][2699]
The current thread ID is 0x6D8, and the stack trace (return addresses) leading to this error is:
40318E [sys\system.pas][System][@FreeMem][2699]
48718F [DB.pas][DB][TDataSet.GetFieldData][9627]
47C3C2 [DB.pas][DB][TField.GetData][3873]
47C5BE [DB.pas][DB][TField.GetIsNull][3980]
44A68A [Controls.pas][Controls][TControl.Click][5229]
...
I crosschecked it with the "stock" Codegear Interbase driver and that does not produce the error.
Any ideas what can cause this or any possible workarounds to avoid it?