[openrtm-users 01195] Re: Problem shutting down component when more then one connection exists

Steffen Wittmeier wittmeis @ in.tum.de
2010年 4月 21日 (水) 15:07:20 JST


Hi Geoff,

thanks for the reply. I found the problem. For the port profile there 
was a _ptr variable instead of a _var variable used in our own 
ConnectionManagement class.

Thanks anyway!


Steffen

On 04/19/2010 01:04 AM, Geoffrey Biggs wrote:
> Although it's Python, not C++, and hasn't been as extensively tested as
> data ports, there is an example of making a service port connection in
> the rtctree library and the rtcshell toolkit. Try using rtcon to make
> the connections and see if you get the same error.
>
> Geoff
>
> On 17/04/10 04:25, Steffen Wittmeier wrote:
>> Hi,
>>
>> I have to add that the problem seems to appear only when I use our own
>> component connection code. Manual connection in the system editor works.
>>
>> Could you maybe provide some example code for corba port connection? In
>> the examples I could only find example code for data port connection.
>>
>> Thanks,
>> Steffen Wittmeier
>>
>> On 04/16/2010 04:53 PM, Steffen Wittmeier wrote:
>>> Hi,
>>>
>>> I receive a seg-fault when calling cleanupComponents(). The problem only
>>> occurs in the following setups (see also attached screenshot).
>>>
>>> If component A (here LogViewer) is destructed by calling exit() on the
>>> component and cleanupComponents() on the manager (somehow
>>> cleanupComponent(rtc) does not call the destructor?) and this component
>>> A is connected to a port of component B (LogManager) which is turn
>>> connected to a component C (EcceosModel) I receive the seg-fault.
>>>
>>> In contrast, if I remove the connection between component B and C and
>>> call exit() on component A, the application exits normally.
>>>
>>> I attached a backtrace of the seg-fault. You can see that I am calling
>>> cleanupComponents() that leads to the destructor call of the PortProfile
>>> which causes the error.
>>>
>>> Is this some internal error where you could provide a fix for? As I
>>> receive the same error when I exit the component A in the
>>> RTSystemEditor, it seems that it is not a problem of the component
>>> deletion within my code.
>>>
>>> Any help is appreciated...
>>>
>>>
>>> Many thanks in advance,
>>> Steffen Wittmeier
>>>
>>>
>>> #0 0x00007ffff2129f3f in omni::releaseObjRef(omniObjRef*) () from
>>> /usr/lib/libomniORB4.so.1
>>> #1 0x00007ffff74aa18b in RTC::PortProfile::~PortProfile() () from
>>> /usr/local/lib/libRTC-1.0.0.so.0
>>> #2 0x00007ffff750e6e0 in RTC::PortBase::~PortBase() () from
>>> /usr/local/lib/libRTC-1.0.0.so.0
>>> #3 0x00007ffff74ef6f6 in RTC::CorbaPort::~CorbaPort() () from
>>> /usr/local/lib/libRTC-1.0.0.so.0
>>> #4 0x00007ffff5ec4f1c in ~LogViewer (this=0xbcdfb0, __in_chrg=<value
>>> optimized out>, __vtt_parm=<value optimized out>)
>>> at
>>> /home/wittmeis/projects/eccerobot/workspaces/workspaceC++/gui @ src/src/er/gui/util/log/LogViewer.cpp:111
>>>
>>>
>>> #5 0x00007ffff5ec9d6f in RTC::Delete<er::gui::util::log::LogViewer>
>>> (rtc=0xbce080) at /usr/local/include/rtm/Factory.h:94
>>> #6 0x00007ffff747e688 in RTC::FactoryCXX::destroy(RTC::RTObject_impl*)
>>> () from /usr/local/lib/libRTC-1.0.0.so.0
>>> #7 0x00007ffff748e027 in
>>> RTC::Manager::deleteComponent(RTC::RTObject_impl*) () from
>>> /usr/local/lib/libRTC-1.0.0.so.0
>>> #8 0x00007ffff748e8a4 in RTC::Manager::cleanupComponents() () from
>>> /usr/local/lib/libRTC-1.0.0.so.0
>>> #9 0x00007ffff1a05e77 in coil::Timer::invoke() () from
>>> /usr/local/stow/OpenRTM-aist-1.0.0/lib/libcoil.so.0
>>> #10 0x00007ffff1a05ef8 in coil::Timer::svc() () from
>>> /usr/local/stow/OpenRTM-aist-1.0.0/lib/libcoil.so.0
>>> #11 0x00007ffff1a0a24a in coil::Task::svc_run(void*) () from
>>> /usr/local/stow/OpenRTM-aist-1.0.0/lib/libcoil.so.0
>>> #12 0x00007ffff240ca04 in start_thread (arg=<value optimized out>) at
>>> pthread_create.c:300
>>> #13 0x00007ffff270180d in clone () at
>>> ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
>>>
>>>
>>>
>>
>



openrtm-users メーリングリストの案内