ros2 / ros2/rclcpp

Possible bug: executor_entities_collection.hpp::update_entities

Open
#2,632 3 comments 0 reactions 1 assignee View on GitHub

@mjcarroll is already working on this.

Since Oct 3, 2024.

Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

Bug report

https://github.com/ros2/rclcpp/blob/a78d0cbd33b8fe0b4db25c04f7e10017bfca6061/rclcpp/include/rclcpp/executors/executor_entities_collection.hpp#L75-L82

I am confused about the

if (entity) {

in line 78. Would this not lead to the on_removed callback not being called, in race cases, even though the element was removed ?
@wjwwood @mjcarroll Is this intended, or a bug ?

Obviously, it's kind of useless, to call the callback with a nullptr, but the behavior is still strange to me. I ran into this issue, as internal structures of my code were not cleaned up, due to the callback not being called.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.