Subject Re: EAssertionFailed: Component already destroyed: IBO_DefaultSession
Author patrick_marten
> I don't have any ideas immediately that come to mind. I would like to see
> all of the code you are using with the TIB_Session component. Are you
> working with multiple instances of that class? If so, for what purpose.

There is one TIB_SessionProps component on a main datamodule.

And there are two thread tasks, where I do create a TIB_Session component and release it once the thread task is done with it's work.

In one of the IBO builds you had changed something, so that I had to create separate TIB_Session, TIB_Connection and TIB_Transaction components for these tasks, but as I said: they are being released in the finally block.

TempIB_Session := TIB_Session.Create(nil);
TempIB_Connection := TIB_Connection.Create(TempIB_Session);
TempIB_CursorUpdateActions := TIB_Cursor.Create(TempIB_Session);
TempIB_Transaction := TIB_Transaction.Create(TempIB_Session);

try
TempIB_Transaction.IB_Connection := TempIB_Connection;

TempIB_CursorUpdateActions.IB_Transaction := TempIB_Transaction;
TempIB_CursorUpdateActions.IB_Connection := TempIB_Connection;
...
...
finally
TempIB_CursorUpdateActions.Close;
FreeAndNil(TempIB_CursorUpdateActions);
FreeAndNil(TempIB_Transaction);
FreeAndNil(TempIB_Connection);
FreeAndNil(TempIB_Session);
end;


It happens not that often and it happens randomly (that's how it appears to me at least). Can't provide any more information, I fear.