[orbitcpp-list] passing a reference to another process
Status: Beta
Brought to you by:
philipd
From: <MHL...@t-...> - 2000-11-18 23:30:08
|
On Son, 19 Nov 2000 00:08:36 Martin Schulze wrote: Hi, I ran into some troubles implementing a signal-slot-technology with CORBA-objects: Given three processes pA, pB, pC. Is it possible to pass a reference retrieved in process pC from the IOR referring to an object in the address space of pB to process pA directly ? In details: Let's say I have interfaces iA, iAA, iB, iBB. class iA_impl contains a class iAA_impl (= oAA), class iB_impl contains a calss iBB_impl (= oBB). Now I have two processes running, pA and pB. pA has an iA_impl on the heap (= oA), pB an iB_impl (= oB). A third process pC is created, retrieving refences to oA and oB through their IORs. A function of iA is called, returning a reference to oAA and a function of iB gives a reference to oBB. Now a function of iAA is called, giving the REFERENCE to oBB AS its ARGUMENT. Another function of oAA is called. It implicitely calls a function of oBB - so process pA uses the reference of oBB that was retrieved in process pC. => A SEGFAULT in pA occurs in the function _orb_get_connection called by the skel of the very last function call mentioned obove. => Bug in orbit or my design error ??? In ASCII: ___________________________________________________________________ Process: pA pB pC ======= ======= ======= Heap: oA <----- oB <----- -oAA <-- | -oBB <-- | | | | | Refs: | | | --(IOR)-- rB | | --(rB->f())- rBB <-- | | | | -----------(IOR)--------- rA | -----------(rA->f1())------- rAA | | -rBB -------------(rA->f2(rBB))------------ (xx->fx(): function calls invoked in pC for retrieving the references) In pA: oA.rBB->callback() segfaults ! ______________________________________________________________________ Sorry for this being a little long! cu Martin. |