-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Description
given the following code: https://gist.github.com/Karsten1987/82837b87fd11ef23353754b9fa31cf7a
the situation:
1.) node spawns a subscriber and a publisher
2.1) main thread spins the executor, having sub and pub talking
2.2) second thread randomly stops the subscription (resetting the shared_ptr of it)
3.) program crashes with the backtrace at the bottom of the gist.
quickly discussed the problem with @wjwwood, when resetting the subscription, the executor still has a raw handle on it which leads to race conditions. The problem can be addressed by turning the handle into a shared pointer.
concretely speaking, this function should return a shared_ptr instead of a raw pointer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working