[omniORB] assert on proxyObjectFactory failed

Mircea Gherzan mgherzan at gmail.com
Fri Sep 7 02:21:04 BST 2007


Thank you for your reply. The stubs are compiled in the same shared
library. I need to have the ORB and stubs ready right after the library
is loaded, so placing the code in a constructor was obvious.

The workaround I found is described in the following mail:

http://www.omniorb-support.com/pipermail/omniorb-list/2000-June/015563.html

However, there is no need to create the _pof_InterfaceName object *right
after* ORB_init. It's enough to have it before the _narrow() or any
other method that creates an InterfaceName_var.

Cheers,
Mircea

Duncan Grisby wrote:
> On Thursday 6 September, Mircea Gherzan wrote:
> 
>> I'm having trouble (on the client) narrowing the right object reference.
>> It seems that the OMNIORB_ASSERT right after proxyObjectFactory::lookup
>> fails (omniInternal.cc). The calling code is located in the
>> __constructor__ function of a shared library, loaded at startup, NOT
>> with dlopen.
> 
> Where are the CORBA stubs for the types you are using?  The problem is
> that the stubs containing the proxy object factories have not been
> loaded by the time your code tries to narrow an object reference. If the
> stubs are in the same shared library as your constructor code, the C++
> runtime has clearly decided to execute your constructor before it runs
> the C++ static initalisers that set up the factories.
> 
> I'm not sure what to suggest, other than to defer whatever you're doing
> until after the shared library is completely loaded. Trying to do
> anything non-trivial at library load time is fraught with dependency
> difficulties.
> 
> Cheers,
> 
> Duncan.
> 


-- 
Mircea Gherzan
Faculty of Automatic Control and Computers
Politehnica University of Bucharest



More information about the omniORB-list mailing list