Subject Problem with IB_Session
Author Robert martin

I have been using IB_Sesion through a multi-threaded application without
problem for some time. However this morning I have been having major
problems with a new thread I created.

When the thread frees it causes multiple AVs (close one, get another).
I have tracked through the code and reduced it down so it essentially
creates and frees. The only component being created or freed now is an
IB_Session. I have discovered the difference between this thread and
others, this one uses FreeOnTerminate, my other threads are manually
freed. If I change the thread to be manually freed it no longer AVs.

Any suggestions as to what I am doing wrong?

Sample code follows (All code in the execute has been removed) All
other code in the creator and destructor has been commented out)


constructor TSendFTP.Create(ibPath, ibServer : String);
inherited Create(True);
FreeOnTerminate := True;

fIb_Session := TIB_Session.Create(Nil);
fIb_Session.UseCursor := False;

destructor TSendFTP.Destroy;
if (fIb_Session <> Nil) then begin

inherited Destroy;

//Calling code
FTP := TSendFTP.Create(Path, Server);
FTP.UploadFile(FileName, False); //UploadFile triggers the
execute method

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496

Wild Software Ltd