Page 1 of 1

TIdThreadComponent D2007 + MyDAC = EAssertionFailed

Posted: Fri 31 Jul 2009 19:09
by Frega
Hello...

im loading a Query using the component TIdThreadComponent... it works ok but, when i close the form with the query it raises an exception:

Project EPO.exe raised an exception class 'EAssertionFailed' with Message 'assertion failure (D:\Projects\Delphi\DAC\Source\DBAcess.pas, line 14955)'



On Close event:
procedure TCli.FormClose(Sender: TObject; var Action: TCloseAction);
begin
FreeAndNil(Cli);
end;

what is this? and how i can soluve?

ps: MyDAC is not instaled on path D:\projects\delphi, it is installed on folder: C:\program files\...

Posted: Mon 03 Aug 2009 07:10
by Dimon
Maybe this error is raised because you destroy the TMyQuery object in the main thread and after this TIdThreadComponent tries to call some method of the freed object.