Corba::ControlTaskProxy::InitOrb then Corba::ControlTaskProxy::DestroyOrb then Corba::ControlTaskProxy::InitOrb again fail

Hi.

I'am coding a gui that should be able to connect, disconnect, connect ... to a "server".

I use in my connect function Corba::ControlTaskProxy::InitOrb, and in my disconnect function Corba::ControlTaskProxy::DestroyOrb.

When i connect, disconnect, reconnect then i call Corba::ControlTaskProxy::Create i get :

8.353 [ ERROR ][ControlTaskProxy] CORBA exception raised when resolving Object ! 8.354 [ ERROR ][ControlTaskProxy] OBJECT_NOT_EXIST

If i check the return of the last Corba::ControlTaskProxy::InitOrb call, it gives me false, so it explain why i can't go further.

It seems that the Corba::ControlTaskProxy::DestroyOrb function doesn't restore the orb variable as it was at the init, so InitOrb return false.

I tried to modify the code with this patch and it works a bit better (it's up to the user to take care to call one destroy for one init, so i skip the orb is_nil check). For releasing the orb i followed the advice at (http://publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modco3.html)

Should i continue to look in this direction or not ?

Thanks.

Paul.

AttachmentSize
orocos-rtt-1.10.4.patch1.6 KB

Corba::ControlTaskProxy::InitOrb then Corba::ControlTaskProxy::D

On Thu, Aug 19, 2010 at 4:00 PM, <paul [dot] chavent [..] ...> wrote:
> Hi.
>
> I'am coding a gui that should be able to connect, disconnect, connect ... to
> a "server".
>
> I use in my connect function Corba::ControlTaskProxy::InitOrb, and in my
> disconnect function Corba::ControlTaskProxy::DestroyOrb.
>
> When i connect, disconnect, reconnect then i call
> Corba::ControlTaskProxy::Create i get :
>
> 8.353 [ ERROR  ][ControlTaskProxy] CORBA exception raised when resolving
> Object !
> 8.354 [ ERROR  ][ControlTaskProxy] OBJECT_NOT_EXIST
>
>
> If i check the return of the last Corba::ControlTaskProxy::InitOrb call, it
> gives me false, so it explain why i can't go further.
>
> It seems that the Corba::ControlTaskProxy::DestroyOrb function doesn't
> restore the orb variable as it was at the init, so InitOrb return false.
>
>
> I tried to modify the code with this patch and it works a bit better (it's
> up to the user to take care to call one destroy for one init, so i skip the
> orb is_nil check). For releasing the orb i followed the advice at
> (http://publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/index.jsp?topic...)
>
>
> Should i continue to look in this direction or not ?

As far As I know, once an orb is destroyed, you are no longer allowed
to create it. So InitOrb is forbidden after DestroyOrb. Different
Corba implementations might decide (non-portably) otherwise.

There is no reason to destroy an orb in order to connect/disconnect.
The orb may live during the whole lifetime of your process, and proper
memory management is done by the orb, for example when you release an
object reference.

Peter
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Corba::ControlTaskProxy::InitOrb then Corba::ControlTaskProxy::D

So if i decide to reconnect to a new server, i don't need to call DestroyOrb between the two InitOrb calls ?

Peter Soetens wrote:
> On Thu, Aug 19, 2010 at 4:00 PM, <paul [dot] chavent [..] ...> wrote:
>> Hi.
>>
>> I'am coding a gui that should be able to connect, disconnect, connect ... to
>> a "server".
>>
>> I use in my connect function Corba::ControlTaskProxy::InitOrb, and in my
>> disconnect function Corba::ControlTaskProxy::DestroyOrb.
>>
>> When i connect, disconnect, reconnect then i call
>> Corba::ControlTaskProxy::Create i get :
>>
>> 8.353 [ ERROR ][ControlTaskProxy] CORBA exception raised when resolving
>> Object !
>> 8.354 [ ERROR ][ControlTaskProxy] OBJECT_NOT_EXIST
>>
>>
>> If i check the return of the last Corba::ControlTaskProxy::InitOrb call, it
>> gives me false, so it explain why i can't go further.
>>
>> It seems that the Corba::ControlTaskProxy::DestroyOrb function doesn't
>> restore the orb variable as it was at the init, so InitOrb return false.
>>
>>
>> I tried to modify the code with this patch and it works a bit better (it's
>> up to the user to take care to call one destroy for one init, so i skip the
>> orb is_nil check). For releasing the orb i followed the advice at
>> (http://publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/index.jsp?topic...)
>>
>>
>> Should i continue to look in this direction or not ?
>
> As far As I know, once an orb is destroyed, you are no longer allowed
> to create it. So InitOrb is forbidden after DestroyOrb. Different
> Corba implementations might decide (non-portably) otherwise.
>
> There is no reason to destroy an orb in order to connect/disconnect.
> The orb may live during the whole lifetime of your process, and proper
> memory management is done by the orb, for example when you release an
> object reference.
>
> Peter
>
>

Corba::ControlTaskProxy::InitOrb then Corba::ControlTaskProxy::D

On Thu, Aug 19, 2010 at 8:30 PM, Paul Chavent <paul [dot] chavent [..] ...> wrote:
> So if i decide to reconnect to a new server, i don't need to call DestroyOrb
> between the two InitOrb calls ?

Not at all. You can connect to as many servers as you wish at the same
time, or spread across time.

Peter

>
> Peter Soetens wrote:
>>
>> On Thu, Aug 19, 2010 at 4:00 PM,  <paul [dot] chavent [..] ...> wrote:
>>>
>>> Hi.
>>>
>>> I'am coding a gui that should be able to connect, disconnect, connect ...
>>> to
>>> a "server".
>>>
>>> I use in my connect function Corba::ControlTaskProxy::InitOrb, and in my
>>> disconnect function Corba::ControlTaskProxy::DestroyOrb.
>>>
>>> When i connect, disconnect, reconnect then i call
>>> Corba::ControlTaskProxy::Create i get :
>>>
>>> 8.353 [ ERROR  ][ControlTaskProxy] CORBA exception raised when resolving
>>> Object !
>>> 8.354 [ ERROR  ][ControlTaskProxy] OBJECT_NOT_EXIST
>>>
>>>
>>> If i check the return of the last Corba::ControlTaskProxy::InitOrb call,
>>> it
>>> gives me false, so it explain why i can't go further.
>>>
>>> It seems that the Corba::ControlTaskProxy::DestroyOrb function doesn't
>>> restore the orb variable as it was at the init, so InitOrb return false.
>>>
>>>
>>> I tried to modify the code with this patch and it works a bit better
>>> (it's
>>> up to the user to take care to call one destroy for one init, so i skip
>>> the
>>> orb is_nil check). For releasing the orb i followed the advice at
>>>
>>> (http://publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/index.jsp?topic...)
>>>
>>>
>>> Should i continue to look in this direction or not ?
>>
>> As far As I know, once an orb is destroyed, you are no longer allowed
>> to create it. So InitOrb is forbidden after DestroyOrb. Different
>> Corba implementations might decide (non-portably) otherwise.
>>
>> There is no reason to destroy an orb in order to connect/disconnect.
>> The orb may live during the whole lifetime of your process, and proper
>> memory management is done by the orb, for example when you release an
>> object reference.
>>
>> Peter
>>
>>
>
>
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Corba::ControlTaskProxy::InitOrb then Corba::ControlTaskProxy::D

Hi.

I'am coding a gui that should be able to connect, disconnect, connect ... to a "server".

I use in my connect function Corba::ControlTaskProxy::InitOrb, and in my disconnect function Corba::ControlTaskProxy::DestroyOrb.

When i connect, disconnect, reconnect then i call Corba::ControlTaskProxy::Create i get :

8.353 [ ERROR ][ControlTaskProxy] CORBA exception raised when resolving Object !
8.354 [ ERROR ][ControlTaskProxy] OBJECT_NOT_EXIST

If i check the return of the last Corba::ControlTaskProxy::InitOrb call, it gives me false, so it explain why i can't go further.

It seems that the Corba::ControlTaskProxy::DestroyOrb function doesn't restore the orb variable as it was at the init, so InitOrb return false.

I tried to modify the code with this patch and it works a bit better (it's up to the user to take care to call one destroy for one init, so i skip the orb is_nil check). For releasing the orb i followed the advice at (http://publib.boulder.ibm.com/infocenter/adiehelp/v5r1m1/index.jsp?topic...)

Should i continue to look in this direction or not ?

Thanks.

Paul.