Skip to content

invalid_argument when using intra-process comms with queue size 0 #727

@cottsay

Description

@cottsay

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • source
  • Version or commit hash:
    • 005131
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

  1. Set use_intra_process_comms(true)
  2. Set QoS queue size to 0 with "keep all" behavior (maybe even SystemDefaultsQoS??)
  3. Create a publisher

Expected behavior

At the very least an actionable error message, but preferably a functioning node and publisher

Actual behavior

terminate called after throwing an instance of 'std::invalid_argument'
  what():  size must be a positive, non-zero value
...
#6  0xXXXXXXXXXXXXXXXX in rclcpp::mapped_ring_buffer::MappedRingBuffer<geometry_msgs::msg::Twist_<std::allocator<void> >, std::allocator<geometry_msgs::msg::Twist_<std::allocator<void> > > >::MappedRingBuffer (this=0xXXXXXXXXXXXX, size=0, 
    allocator=std::shared_ptr<std::allocator<geometry_msgs::msg::Twist_<std::allocator<void> > >> (use count 2, weak count 0) = {...}) at /opt/ros/master/install/include/rclcpp/mapped_ring_buffer.hpp:82
...

Additional information

Workaround is to set a non-zero queue size and use "keep last" behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions