[omniORB] Abort when doing a _narrow in omniORB3

Zed Shaw zedshaw@killnine.net
Thu, 7 Jun 2001 00:41:34 +0000


Hello All,

Just need some quick help on this.  I'm sure it is something stupid.

I'm currently converting an application from MICO to omniORB (and possibly 
others).  This application works fine in MICO, but in omniORB, I can't do 
_narrow calls.  Everytime I do it, I get the following:

omniORB: Assertion failed.  This indicates a bug in the application using
omniORB, or maybe in omniORB itself. e.g. using the ORB after it has
been shut down.
 file: ../omniInternal.cc
 line: 638
 info: pof
Aborted

This line number changes, but (after looking at the code) it appears to be 
this same check in omniInternal.cc:

  if( !pof ) {
    pof = proxyObjectFactory::lookup(targetRepoId);
    OMNIORB_ASSERT(pof);
    // The assertion above will fail if your application attempts to
    // create an object reference while another thread is shutting
    // down the ORB.

My code is pretty vanilla stuff.  I just do the following on the client:

// ior is a c++ string with the IOR in it
CORBA::Object_var myobject = orb->string_to_object (ior.c_str ());
MyModule::MyObject_var test_table = MyModule::MyObject::_narrow(myobject);

And this on the server:
MyModule::MyObject_impl *myServant = new MyModule::MyObject(init_stuff);
MyModule::MyObject_var myReference = myServant->this();

So, any ideas what's going on here?  I'm running the latest omniORB 3 (3.0.3) 
and I'm using Linux (Mandrake 7.2) on an x86 platform (AMD).

-- 
Zed A. Shaw