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

Mike Bendickson Mike.Bendickson@spanlink.com
Tue, 15 Aug 2000 13:13:48 -0500


Yes, NP_destroy() does return.

After execute impl_shutdown(), [CORBA:BOA::impl_is_ready] thread is killed.

After execute orb->NP_destroy(), [omniORB_Ripper::run_undetached] and
[omni_Scavenger::run_undetached] are killed.

Then when trying to go one further step in our CORBA server thread (which
should return to main), assertion failure.

We modified our project to create a static library instead of a DLL, and the
problem went away.

Any suggestions?

-Mike

-----Original Message-----
From: sll@uk.research.att.com [mailto:sll@uk.research.att.com]On Behalf
Of Sai-Lai Lo
Sent: Thursday, August 10, 2000 10:23 AM
To: Mike Bendickson
Cc: omniorb-list@uk.research.att.com
Subject: Re: [omniORB] Getting a debug assertion error while trying to
shut down a corba server.


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