[omniORB] Object::_get_interface() always returns nil ref.

Duncan Grisby duncan at grisby.org
Fri Mar 26 13:29:55 GMT 2004


On Monday 22 March, Alex Tingle wrote:

> I'm working on `omniifr' an implementation of the Interface Repository.

That's good.

> The first draft is very nearly complete, but I'm having trouble with
> omniORB's implementation of the Object::_get_interface() method - it
> always returns a nil reference!

That's not...

[...]
> 1. test program requests ifr's _interface method.
> 2. ifr's ORB successfully resolves initial ref to the
>    repository (which happens to be itself).
> 3. Call to Repository::lookup_id() is requested and returns
>    sucessfully with the InterfaceDef reference.
> 4. Nil reference is returned to test program.
> 
> So, the problem seems to occur between steps 3 and 4.
> 
> Anybody have a clue?

Not really. I think you should instrument the omniORB code to see
where it becomes nil. In case you haven't figured out the control flow
you need to instrument, the progress of the calls through omniORB is:

1. Client calls _get_interface() from dynamic/ir.cc
2. That does an _interface call on the object.
3. The call finds its way to omniServant::_dispatch in
   orbcore/omniServant.cc
4. That calls lcfn() in orbcore/objectStub.cc
5. That calls PortableServer::Servant::_do_get_interface in
   orbcore/portableserver.cc
6. That calls lookup_id on the IfR.
7. The result is returned, being narrowed at various stages along the
   way.

The trace shows that the reference becomes nil before it is returned
to the client, so you should add debugging output to stages 3 onwards.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list