[omniORB] Getting a debug assertion error while trying to shut down a corba server.

Sai-Lai Lo S.Lo@uk.research.att.com
10 Aug 2000 16:23:24 +0100


Calling impl_shutdown() from another thread is the right thing to do.
You said NP_destroy() executes as expected, does this mean that you are
getting the assertion failure after NP_destroy() returns? In your code
there may be object references or implementations being deleted after the
ORB has been completely shutdown. This of course results in unpredictable
behaviour. 

Another point to check is whether your code works if you are not using the
DLL loading mechanism.

Sai-Lai

>>>>> Mike Bendickson writes:

> I have a Windows NT DLL that creates a thread and starts a corba server.
> Something like this:

> Server thread:
>   .
>   . // startup stuff omitted
>   .
boa-> impl_is_ready();
boa-> destroy();
orb-> NP_destroy();

> The main thread needs to be able to shut down the the corba server.  Looking
> at the 2.8.0 docs it looks like I should be able to do this:

> Main thread:
boa-> impl_shutdown();

> The server breaks out of the imp_is_ready() function and executes the
> destroy and NP_destroy() methods as expected, but I get the following
> assertion error:

> 	 Assertion failed: 0, file ..\..\object.cc, line 830

> Looking at object.cc:

>   omniObject::~omniObject()
>   {
>     if (pd_refCount) {
>       // A dtor should not be called if the reference count is not 0
>       assert(0);
>     }
>     .
>     .
>     .

> I'm using Windows NT 4.0, VC++ 6 and omniORB 2.8.0.

> Any ideas?








-- 
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