Giter VIP home page Giter VIP logo

Comments (2)

Martin-Idel-SI avatar Martin-Idel-SI commented on July 30, 2024

The error above is due to the fact that we have a problem with our pluginlib usage: The factory must survive longer than any instance created by it.

We have heavily improved the tests (#31). Sadly, the rosbag2_write_integration_test (and the second write rosbag2_write_all_integration_test) are still flaky:

Linux seems fine now, but we get the error Expression: vector erase iterator outside range with the following stack trace on Windows, which seems unrelated to our code:

 	msvcp140d.dll!00007ffecd72fc06()	Unknown
 	fastrtpsd-1.6.dll!std::vector<std::pair<eprosima::fastrtps::Publisher * __ptr64,eprosima::fastrtps::PublisherImpl * __ptr64>,std::allocator<std::pair<eprosima::fastrtps::Publisher * __ptr64,eprosima::fastrtps::PublisherImpl * __ptr64> > >::erase(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<std::pair<eprosima::fastrtps::Publisher *,eprosima::fastrtps::PublisherImpl *> > > > _Where) Line 1475	C++
 	fastrtpsd-1.6.dll!eprosima::fastrtps::ParticipantImpl::removePublisher(eprosima::fastrtps::Publisher * pub) Line 84	C++
 	fastrtpsd-1.6.dll!eprosima::fastrtps::Domain::removePublisher(eprosima::fastrtps::Publisher * pub) Line 93	C++
 	rmw_fastrtps_shared_cpp.dll!rmw_fastrtps_shared_cpp::__rmw_destroy_publisher(const char * identifier, rmw_node_t * node, rmw_publisher_t * publisher) Line 67	C++
 	rmw_fastrtps_cpp.dll!rmw_destroy_publisher(rmw_node_t * node, rmw_publisher_t * publisher) Line 189	C++
 	rmw_implementation.dll!rmw_destroy_publisher(rmw_node_t * v2, rmw_publisher_t * v1) Line 245	C++
 	rcl.dll!rcl_publisher_fini(rcl_publisher_t * publisher, rcl_node_t * node) Line 210	C
 	rclcpp.dll!rclcpp::PublisherBase::~PublisherBase() Line 90	C++
 	rosbag2_write_integration_test.exe!rclcpp::Publisher<std_msgs::msg::String_<std::allocator<void> >,std::allocator<void> >::~Publisher<std_msgs::msg::String_<std::allocator<void> >,std::allocator<void> >() Line 181	C++
 	[External Code]	
 	rosbag2_write_integration_test.exe!RosBag2WriteIntegrationTestFixture::start_publishing::__l2::<lambda>() Line 101	C++
 	[External Code]	
 	[Async Call]	
 	[External Code]	
 	rosbag2_write_integration_test.exe!RosBag2WriteIntegrationTestFixture::start_publishing(std::shared_ptr<rosbag2_storage::SerializedBagMessage> message, std::basic_string<char,std::char_traits<char>,std::allocator<char> > topic_name, unsigned __int64 number_expected_messages) Line 90	C++
 	rosbag2_write_integration_test.exe!RosBag2WriteIntegrationTestFixture_published_messages_from_multiple_topics_are_recorded_Test::TestBody() Line 43	C++
 	rosbag2_write_integration_test.exe!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2380	C++
 	rosbag2_write_integration_test.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2431	C++
 	rosbag2_write_integration_test.exe!testing::Test::Run() Line 2474	C++
 	rosbag2_write_integration_test.exe!testing::TestInfo::Run() Line 2649	C++
 	rosbag2_write_integration_test.exe!testing::TestCase::Run() Line 2764	C++rosbag2_write_integration_test.exe!RosBag2WriteIntegrationTestFixture::start_publishing(std::shared_ptr<rosbag2_storage::SerializedBagMessage> message, std::basic_string<char,std::char_traits<char>,std::allocator<char> > topic_name, unsigned __int64 number_expected_messages) Line 90	C++
 	rosbag2_write_integration_test.exe!RosBag2WriteIntegrationTestFixture_published_messages_from_multiple_topics_are_recorded_Test::TestBody() Line 43	C++
 	rosbag2_write_integration_test.exe!testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2380	C++
  	rosbag2_write_integration_test.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void(testing::Test * object, void(testing::Test::*)() method, const char * location) Line 2431	C++
  	rosbag2_write_integration_test.exe!testing::Test::Run() Line 2474	C++
  	rosbag2_write_integration_test.exe!testing::TestInfo::Run() Line 2649	C++
  	rosbag2_write_integration_test.exe!testing::TestCase::Run() Line 2764	C++

This error is thrown upon finishing our publishing async call, which automatically destroys the publisher (as seen from the stacktrace). This is here:

The code is not yet tested on Mac

from rosbag2.

Karsten1987 avatar Karsten1987 commented on July 30, 2024

fixed in #38

from rosbag2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.