Project

General

Profile

バグ #3708

SimpleIOサンプルのConnectorComp.cppにおける初期化処理の修正

Added by n.kawauchi almost 5 years ago. Updated over 2 years ago.

Status:
解決
Priority:
通常
Assignee:
Target version:
-
Start date:
11/15/2016
Due date:
% Done:

100%

Estimated time:

Description

下記投稿への対応

[openrtm-users 03328] Ubuntu 14.04,OpenRTM C++ 1.1.xでSimpleIO ConnectorCompを実行するとinvalid pointerコアダンプが発生する

環境:
Ubuntu 14.04.5 LTS Linux 4.4.0-36-generic gcc 4.8.4 omniORB 4.1.6-2
OpenRTM-aist C++版 ソースコード OpenRTM-aist-1.1.2.tar.gz
をベースに記述いたします.
初回コンパイルを終えると,
examples/SimpleIO/以下で./run.shを実行するとサンプルプログラムが実行されるかと思います.
このときConnectorCompの実行時に, Name Server: localhost:9876
Subscription Type: flush push policy: skip count: connect: ConsoleIn ->
ConsoleOut *** Error in `(略)/examples/SimpleIO/.libs/lt-ConnectorComp':
free(): invalid pointer: 0x000000000040864b *** のようにinvalid
pointerエラーが発生します.
具体的には,ConnectorComp.cppの275行目, ReturnCode_t ret; if
(connect_origin == "in") { ret = pin[(CORBA::ULong)0]->connect(prof); }
のconnect時にエラーが発生しています.
表面的な原因を調査しましたところ, OpenRTM-aist
1.0.2でSimpleIOを実行した際にはエラーは発生せず,
同226行目 prof.connector_id = (char*)""; の部分が,OpenRTM-aist
1.0.xでは, prof.connector_id = ""; となっていました.
1.1.0や1.1.2でも同じく(char*)を削除するとエラーなく実行できました.

Associated revisions

Revision 2800 (diff)
Added by kawauchi almost 5 years ago

Initialization of connector_id was corrected. refs #3708

Revision 2800 (diff)
Added by kawauchi almost 5 years ago

[compat,bugfix,->RELENG_1_2] Initialization of connector_id was corrected. refs #3708

Revision 3097 (diff)
Added by n-ando almost 4 years ago

merged changes from trunk/OpenRTM-aist r2795 during 2016-11
[incompat,bugfix,EC,->RELENG_1_2] EC activation bug for multiple RTCs when they activated from participants RTCs. refs #3697
[incompat,bugfix,EC,->RELENG_1_2] Return code was added. refs #3697
[incompat,bugfix,EC,->RELENG_1_2]Modified for ExtTrigExecutionContext. #3697
[compat,bugfix,->RELENG_1_2]refs #3703
[compat,bugfix,->RELENG_1_2] Initialization of connector_id was corrected. refs #3708
[compat,->RELENG_1_2] ExtTrigger sample has been added in windows source package. refs #3709
[compat,1.2,->RELENG_1_2] Version number updated.
[incompat,->RELENG_1_2] CPU affinity setting has been added. refs #3711
[incompat,->RELENG_1_2] CPU affinity setting for ExecutionContext (only PeriodicEC) has been added. refs #3711
[incompat,->RELENG_1_2] CPU affinity setting for ExecutionContext (only PeriodicEC) has been added. refs #3711

Revision 3097 (diff)
Added by n-ando almost 4 years ago

merged changes from trunk/OpenRTM-aist r2795 during 2016-11
[incompat,bugfix,EC,->RELENG_1_2] EC activation bug for multiple RTCs when they activated from participants RTCs. refs #3697
[incompat,bugfix,EC,->RELENG_1_2] Return code was added. refs #3697
[incompat,bugfix,EC,->RELENG_1_2]Modified for ExtTrigExecutionContext. #3697
[compat,bugfix,->RELENG_1_2]refs #3703
[compat,bugfix,->RELENG_1_2] Initialization of connector_id was corrected. refs #3708
[compat,->RELENG_1_2] ExtTrigger sample has been added in windows source package. refs #3709
[compat,1.2,->RELENG_1_2] Version number updated.
[incompat,->RELENG_1_2] CPU affinity setting has been added. refs #3711
[incompat,->RELENG_1_2] CPU affinity setting for ExecutionContext (only PeriodicEC) has been added. refs #3711
[incompat,->RELENG_1_2] CPU affinity setting for ExecutionContext (only PeriodicEC) has been added. refs #3711

History

#1 Updated by n.kawauchi almost 5 years ago

  • % Done changed from 0 to 100

connector_idは、構造体 RTC::ConnectorProfile の UniqueIdentifier型のメンバ変数で、下記定義よりstring型のため、
CORBA::string_dupを使って初期化した。

typedef SDOPackage::UniqueIdentifier RTC::UniqueIdentifier
typedef string SDOPackage::UniqueIdentifier

#2 Updated by n.kawauchi over 2 years ago

  • Status changed from 新規 to 解決

Also available in: Atom PDF