OpenRTM / OpenRTM-aist

OpenRTM-aist: RT-Middleware and OMG RTC implementation in C++ implemented by AIST
https://openrtm.org/
Other
19 stars 12 forks source link

ConsoleIn/ConsoleOut のリスナー登録解除と削除がされない #672

Closed r-kurose closed 4 years ago

r-kurose commented 4 years ago

Describe the bug onInitialize() で登録しているリスナーたちが remove されず、delete もされていない。 サンプルコンポーネントで示すお作法として良くない。

https://github.com/OpenRTM/OpenRTM-aist/blob/5fcca4a0d906b72429c646d85f749b17092eea09/examples/SimpleIO/ConsoleOut.cpp#L56-L63

To Reproduce 省略

Reproducibility 省略

Expected behavior RTC の状態遷移に従い、削除されること

Screenshots or Logs

669 より、

Indirect leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x362f12 in operator new(unsigned long) (/tmp/build/examples/SimpleIO/ConsoleOutComp+0x362f12)
    #1 0x3693bc in ConsoleOut::onInitialize() /tmp/OpenRTM-aist/examples/SimpleIO/ConsoleOut.cpp:73:37
    #2 0x7efda3316439 in RTC::RTObject_impl::on_initialize() /tmp/OpenRTM-aist/src/lib/rtm/RTObject.cpp:788:15
    #3 0x7efda3309c6a in RTC::RTObject_impl::initialize() /tmp/OpenRTM-aist/src/lib/rtm/RTObject.cpp:341:11
    #4 0x7efda3492a0b in RTC::Manager::createComponent(char const*) /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:802:15
    #5 0x3986c4 in MyModuleInit(RTC::Manager*) /tmp/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp:41:19
    #6 0x7efda348393c in RTC::Manager::invokeInitProc() /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:2798:9
    #7 0x7efda348294e in RTC::Manager::activateManager() /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:338:5
    #8 0x3996fe in main /tmp/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp:109:12
    #9 0x7efda12b5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Environment 例えば、 #669

Additional context なし

r-kurose commented 4 years ago

682 で終了処理が正しく行われて自動で削除されるはず。

r-kurose commented 4 years ago

削除されていることが確認できました。 (#669 の 2019-10-24 版ログ)