{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rmw_connext/issues/31","labels_url":"https://api.github.com/repos/ros2/rmw_connext/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rmw_connext/issues/31/comments","events_url":"https://api.github.com/repos/ros2/rmw_connext/issues/31/events","html_url":"https://github.com/ros2/rmw_connext/issues/31","id":72297934,"number":31,"title":"segfault in all connext request-response tests on Windows","user":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars.githubusercontent.com/u/100427?v=3","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ros2/rmw_connext/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"esteve","id":33620,"avatar_url":"https://avatars.githubusercontent.com/u/33620?v=3","gravatar_id":"","url":"https://api.github.com/users/esteve","html_url":"https://github.com/esteve","followers_url":"https://api.github.com/users/esteve/followers","following_url":"https://api.github.com/users/esteve/following{/other_user}","gists_url":"https://api.github.com/users/esteve/gists{/gist_id}","starred_url":"https://api.github.com/users/esteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esteve/subscriptions","organizations_url":"https://api.github.com/users/esteve/orgs","repos_url":"https://api.github.com/users/esteve/repos","events_url":"https://api.github.com/users/esteve/events{/privacy}","received_events_url":"https://api.github.com/users/esteve/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-04-30T22:22:45Z","updated_at":"2015-11-17T21:59:16Z","closed_at":null,"body":"All of the connext based request-response tests and examples crash in the `std::string` implementation with this error:\r\n\r\n```\r\nUnhandled exception at 0x00007FFF11C61332 (vcruntime140d.dll) in test_server__rmw_connext_cpp.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.\r\n```\r\n\r\nThe back trace (of the connext version of `test_server`):\r\n\r\n```\r\n>\tuserland_msgs__rosidl_typesupport_connext_cpp.dll!std::char_traits<char>::copy(char * _First1, const char * _First2, unsigned __int64 _Count) Line 529\tC++\r\n \tuserland_msgs__rosidl_typesupport_connext_cpp.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right, unsigned __int64 _Roff, unsigned __int64 _Count) Line 1132\tC++\r\n \tuserland_msgs__rosidl_typesupport_connext_cpp.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right) Line 1115\tC++\r\n \tuserland_msgs__rosidl_typesupport_connext_cpp.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right) Line 1003\tC++\r\n \tuserland_msgs__rosidl_typesupport_connext_cpp.dll!connext::ReplierParams<userland_msgs::dds_::AddTwoIntsRequest_,userland_msgs::dds_::AddTwoIntsResponse_>::service_name(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & service_name) Line 72\tC++\r\n \tuserland_msgs__rosidl_typesupport_connext_cpp.dll!userland_msgs::service_type_support::create_replier__AddTwoInts(void * untyped_participant, const char * service_name, void * * untyped_reader) Line 74\tC++\r\n \trmw_connext_cpp.dll!rmw_create_service(const rmw_node_t * node, const rosidl_service_type_support_t * type_support, const char * service_name) Line 640\tC++\r\n \ttest_server__rmw_connext_cpp.exe!rclcpp::node::Node::create_service<userland_msgs::AddTwoInts>(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & service_name, std::function<void __cdecl(std::shared_ptr<rmw_request_id_t> const &,std::shared_ptr<userland_msgs::AddTwoIntsRequest_<std::allocator<void> > > const &,std::shared_ptr<userland_msgs::AddTwoIntsResponse_<std::allocator<void> > > &)> callback_with_header, std::shared_ptr<rclcpp::callback_group::CallbackGroup> group) Line 219\tC++\r\n \ttest_server__rmw_connext_cpp.exe!main(int argc, char * * argv) Line 36\tC++\r\n```\r\n\r\nIt's my belief that this is related to https://github.com/ros2/ros2/issues/31, because when researching that issue I remember a discussion online about how the libc++ developers intentionally caused a link time error even though they could have made it work in order to avoid a run time error which would occur when creating a `std::string` in one library and passing it to a library built with a different version. Here is the summary:\r\n\r\nhttp://stackoverflow.com/questions/8454329/why-cant-clang-with-libc-in-c0x-mode-link-this-boostprogram-options-examp/8457799#8457799\r\n> In order to turn this run time crash into a link time error, libc++ uses a C++11 language feature called inline namespace to change the ABI of std::string without impacting the API of std::string. That is, to you std::string looks the same. But to the linker, std::string is being mangled as if it is in namespace std::__1. Thus the linker knows that std::basic_string and std::__1::basic_string are two different data structures (the former coming from gcc's libstdc++ and the latter coming from libc++).\r\n\r\nAnd I think that the VS2013 - VS2015 Preview headers do not use this trick, but potentially do change the implementation of `basic_string`, which would cause an issue. This might be expected since they do not encourage you to use binaries built with one VC with binaries built from another.\r\n\r\nSo, it looks to me that we have no bug in our code, but simply that we need newer or from source versions of the RTI libraries to make this work."},"comment":{"url":"https://api.github.com/repos/ros2/rmw_connext/issues/comments/157522481","html_url":"https://github.com/ros2/rmw_connext/issues/31#issuecomment-157522481","issue_url":"https://api.github.com/repos/ros2/rmw_connext/issues/31","id":157522481,"user":{"login":"tfoote","id":447804,"avatar_url":"https://avatars.githubusercontent.com/u/447804?v=3","gravatar_id":"","url":"https://api.github.com/users/tfoote","html_url":"https://github.com/tfoote","followers_url":"https://api.github.com/users/tfoote/followers","following_url":"https://api.github.com/users/tfoote/following{/other_user}","gists_url":"https://api.github.com/users/tfoote/gists{/gist_id}","starred_url":"https://api.github.com/users/tfoote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfoote/subscriptions","organizations_url":"https://api.github.com/users/tfoote/orgs","repos_url":"https://api.github.com/users/tfoote/repos","events_url":"https://api.github.com/users/tfoote/events{/privacy}","received_events_url":"https://api.github.com/users/tfoote/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T21:59:16Z","updated_at":"2015-11-17T21:59:16Z","body":"Holding off on this hoping for an upstream fix to work with VS2015"}}