[openrtm-users 03064] Re: (無題)

attila.bernath @ sztaki.hu attila.bernath @ sztaki.hu
2014年 7月 17日 (木) 05:17:44 JST


Some more details: - I have ubuntu linux 12.04 and g++ version 4.6.3 - I
managed to recompile omniorb 4.1.5 with -g -O0 option, and it turned out that
the line pd_ncs_c and pd_tcs_c both are null pointers when the segfault
happens. - Adding a strange line (a constructor of an InPort) somehow solves
this issue (there is no segfault any more at least). I include the modified
code (that does not give a segfault). (Can someone tell me how to attach a
file, please?) #include #include #include #include #include using std::cout;
using std::cerr; using std::endl; using std::stringstream; using std::string;
int main(int argc, char **argv) { RTC::TimedString data; // const char* c =
"hu"; // std::string s; // std::cout << "Please input string: "; //
std::getline(std::cin, s); // data.data = CORBA::string_dup(s.c_str());
RTC::TimedString data2; // commenting out the next line results in a segfault
RTC::InPort("hi", data2); std::cout << data.data << std::endl;
cdrMemoryStream os; std::cerr << "Hi" << std::endl; data >>= os; std::cerr <<
"Hi2" << std::endl; } Attila



More information about the openrtm-users mailing list