Subject Re: [IBO] ICS ERROR 335544726
Author yovchoz
Each thread that I use have its own TIB_Session. For problem thread,
I have IB_Session only on first datamodule. But no matter of what I
trying (add a session to second datamodule too, for example) the
prblem still persists

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 02:44 PM 12/07/2003 +0000, you wrote:
> >Hi,
> >
> >I have two datamodules (mixed usage of TIBOXXX and TIB_xxx
> >components) that works just fine as a part of standart
application.
> >First module contains only a singli TIBODatabase component,
> >second have a lot of IBO components that use a database from the
> >first datamodule. Second datamodule have a long initialization (it
> >reads data from a couple of tables in memory lists)
> >
> >In addition, I have a NT service application that have four
separate
> >threads handlin miscelanous tasks (all threads use TIB_xxx
> >components). Service works just fine.
> >
> >Now I'm trying to put datamodules from the first application to
the
> >separate thread as a part of my service application.
> >
> >If I create datamodules as a part of service application creation
> >(construct before application.run or hook to
> >TService.OnServiceCreate) all work fine in most cases, I can
access
> >code from datamodules from separate thread, but sometimes (because
> >of the long initialization) Windows service manager cannot run my
> >service (timeout)
> >
> >I try to move datamodules creation to the same thread that uses
it,
> >but witout luck:
> >Everytime, a second module initialization runs to random point and
> >one of the following occur:
> >- initialization hangs on random place
> >or
> >- in most cases, application raises an exception (on random
stage!):
> > ISC Error Code 335544726 (error reading from the connection).
> >
> >In most cases, Firebird is not answering to client requsts anymore
> >after that exception.
>
> That's because the client has crashed with an access violation.
>
> Threads can't share the default session. When creating datamodules
for
> threads, you must drop an explicit TIB_Session component in there
and make
> it first in the creation order.
>
> Helen