[omniORB] omniORB in C++ DLL called by (embarrassment) VB

agonne - Andrew Gonnet AGONNE@acxiom.co.uk
Wed, 21 Jul 1999 08:48:23 +0100


Sai-Lai,

Yes, if I turn the "out scavenger" thread off by passing command line 
option "-ORBoutConScanPeriod 0" to ORB_init this problem doesn't 
occur. Thanks for this suggestion!

And now, a further question: I can run with "out scavenger" off during 
debugging and on when for the release VB "exe" version, but it would 
be even better to be able to stop the "out scavenger" thread just 
before returning to the VB IDE. Is this possible?

Thanks again,

Andrew.


PS. Thanks also to Keith and Jim for your replies to my posting.
----------
From:  Sai-Lai Lo [SMTP:S.Lo@uk.research.att.com]
Sent:  20 July 1999 15:38
To:  agonne - Andrew Gonnet
Cc:  omniorb-list@uk.research.att.com
Subject:  Re: [omniORB] omniORB in C++ DLL called by (embarrassment) 
VB

The only issue I can think of is whether the out scavenger thread is 
still
running. A global dtor is suppose to take care of shutdown the thread 
when
the DLL is unloaded. I'm not sure if it is called when VB returns.

You might want to try running with out scavenger off.

Sai-Lai

>>>>> agonne  writes:

> Hi,
> A small problem:

> Background:
> Client running omniORB 2.7.1 on NT 4.0 Intel PC. It is a VB program 
> which calls C functions in a C/C++ DLL which in turn call the
> initialisation and my application Corba methods.
> Implementation and omniNames running on "Tru64" unix, also omniORB
> 2.7.1

> Problem:
> When running the program from the VB IDE, when the VB program
> finishes, and the VB system attempts to return to the IDE, it hangs. 
> This problem does not occur if I compile the VB program and run the 
> exe, this exits cleanly.

> I'm guessing this is because VB runs a single process, interpreting 
> the VB code from the same thread as the IDE is run from. This means 
> that when a VB program "finishes" the process itself doesn't finish, 
> so for some reason perhaps the child threads in the ORB are not
> shutdown properly (although the DLL write-lock is released and I can 
> write a new version from C++ IDE if I wish).

> I have cut the program down to just ORB_init and this problem still 
> occurs.

> I would like to shut everything down by calling the "ORB::shutdown" 
> and "ORB::destroy" methods (as per the Corba V2.3 spec) but
> unfortunately these are not implemented in omniORB 2.7.1.

> Has anyone else also had this problem?
> Does anyone have any ideas or suggestions?




--
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW: 
  http://www.uk.research.att.com
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND