[omniORB] About building CORBA shared library

lvw@lfpt.rwth-aachen.de lvw@lfpt.rwth-aachen.de
Sat, 2 Mar 2002 14:32:03 +0330 (GMT+03:30)


Hi Zhang,

we experienced exactly the same problem, using Solaris 2.8 and Sun CC 5
aswell as g++. Duncan proposed to track down the interface id at 
activation so it might have to do with initialising static members!?

See the mail exchange several weeks ago.

Are you using libtool? When I use static linking, everything is fine. Probably
I can find some time next week to track the problem down.

Lars

>2.3) I can load the test_i object from the shared
>library, but I can not get its object reference.Below
>is the regiester source code:
>"
>void main(int argc,char **argv)
>{
>       CORBA::ORB_var orb = CORBA::ORB_init(argc,
>argv, "omniORB3");
>
>       // Obtain a reference to the root POA.
>        CORBA::Object_var obj =
>orb->resolve_initial_references("RootPOA");
>        PortableServer::POA_var poa =
>PortableServer::POA::_narrow(obj);
>       
>        test_i * b = new test_i();
>        PortableServer::ObjectId_var mytest =
>poa->activate_object(b);
>        test_var obj1 = b->_this();//?Probelm here?//
>        CORBA::String_var
>sior(orb->object_to_string(obj1));
>        cerr << "'" << (char*)sior << "'" << endl;
>        
>        b->_remove_ref();
>
>        PortableServer::POAManager_var pman =
>poa->the_POAManager();
>        pman->activate();
>
>        orb->run();
>        orb->destroy();
>}
>"
>
>It can be compiled and when I run it, I get such error
>information:
>"
>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: 743
> info: pof
>Abort (core dumped)
>"
>
>It happened just at " test_var obj1 = b->_this(); ".
>
>Any advices and comments on it are welcomed!!
>
>Thanks,
>shifeng
>
>
>
>
>
>
>
>
>