Shutdown problem with 2 UniConnection (Firebird) in seperate threads

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
HelgeLange
Posts: 17
Joined: Wed 13 Jun 2007 16:40
Location: Caracas

Shutdown problem with 2 UniConnection (Firebird) in seperate threads

Post by HelgeLange » Sat 25 Jul 2015 11:41

Hi DevArt,

I use a firebird connection in a program, that also uses a small thread pool where sometimes a new connection to another DB is opened, some job executed and, when the queue is empty, closed again.

Up to here everything works fine. The jobs can be done in 1-x different databases to the main database, which is open from the very beginning to the end. The Job-connections are opened and run in a thread and closed in the same context and later freed in the main thread.

I use BPLs btw for the Main exe, the other bpls and the DLLs, all use runtime packages.

When I try to shutdown the program it always gets stuck unloading DLLs. I traced the problem back to the unidac components in the thread connections. While I don't create the thread, is shuts down normally. If I create the connection, it gets stuck. If I do the thread and everything just without unidac, is works. Now I changed to DbExpress for the thread connection and it also works fine..

Any ideas ?

Thanks in advance...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Shutdown problem with 2 UniConnection (Firebird) in seperate threads

Post by ViktorV » Mon 27 Jul 2015 08:32

To resolve the problem try to assign the ForceUnloadClientLibrary global variable the TRUE value. This variable is declared in the UniCall.pas module. In case it doesn't help, please compose a small sample demonstrating the problem and send it to viktorv*devart*com, including scripts for creating database objects.

Post Reply