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

Geoffrey Biggs geoffrey.biggs @ aist.go.jp
2014年 7月 18日 (金) 17:59:44 JST


The problem with the source you have provided is that omniORB (which
provides the cdrMemoryStream implementation) has not been properly
initialised before you call it. This is why it is segfaulting.

Geoff


On 18 July 2014 05:07, <attila.bernath @ sztaki.hu> wrote:

> Dear Geoff, I use cmake. The OpenRTM is of version 1.1. Contents of the
> file
> bad_test_RTMHexConverter.cpp: #include #include #include #include int
> main(int argc, char **argv) { RTC::TimedString data; 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; } Contents
> of the CMakeLists.txt file: cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
> project(cdrStreamProba) set(CMAKE_BUILD_TYPE Debug) find_package(OpenRTM)
> if(${OpenRTM_FOUND}) MESSAGE(STATUS "OpenRTM configuration Found")
> else(${OpenRTM_FOUND}) message(STATUS "Use cmake/Modules/FindOpenRTM.cmake
> in
> the project") list(APPEND CMAKE_MODULE_PATH
> ${PROJECT_SOURCE_DIR}/cmake/Modules) find_package(OpenRTM REQUIRED)
> endif(${OpenRTM_FOUND}) if (DEFINED OPENRTM_INCLUDE_DIRS) string(REGEX
> REPLACE "-I" ";" OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}")
> string(REGEX
> REPLACE " ;" ";" OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}") endif
> (DEFINED OPENRTM_INCLUDE_DIRS) include_directories(${OPENRTM_
> INCLUDE_DIRS})
> message("omniorb" ${OMNIORB_INCLUDE_DIRS})
> add_executable(bad_test_RTMHexConverter bad_test_RTMHexConverter.cpp)
> target_link_libraries(bad_test_RTMHexConverter ${OPENRTM_LIBRARIES})
> Attila
>
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users @ openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
>
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140718/04b77045/attachment.html>


More information about the openrtm-users mailing list