TIdThreadComponent D2007 + MyDAC = EAssertionFailed

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Frega
Posts: 8
Joined: Thu 23 Apr 2009 18:44

TIdThreadComponent D2007 + MyDAC = EAssertionFailed

Post by Frega » Fri 31 Jul 2009 19:09

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\...

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 03 Aug 2009 07:10

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.

Post Reply