Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign nullptr to spin_thread_ after deletion #30

Closed

Conversation

NiPeter
Copy link

@NiPeter NiPeter commented Sep 1, 2021

In class BaseCostmapToPolygons, spin_thread_ pointer variable is used to check if thread should be stopped and join.
After deletion in stopWorker ptr was never set to nullptr, so second call to stopWorker blocks forever.
This bug prevent TEB planner from being used in lifecycle node, because BaseCostmapToPolygons cannot be stopped then destructed.

Solution is to set spin_thread_ to null after deletion. In future, it will be more reliable to use smart pointers instead of raw.

In class BaseCostmapToPolygons, spin_thread_ pointer variable is used to check if thread should be stopped and join.
After deletion in stopWorker ptr was never set to nullptr, so second call to stopWorker blocks forever.
This bug prevent TEB planner from beeing used in lifecycle node, becouse BaseCostmapToPolygons cannot be stopped then destructed.
@NiPeter NiPeter closed this Sep 2, 2021
@NiPeter
Copy link
Author

NiPeter commented Sep 2, 2021

Duplicate #27. Sorry for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant