ros-visualization / rqt_image_view

http://wiki.ros.org/rqt_image_view
25 stars 59 forks source link

[ros2] segfault during shutdown #57

Open clydemcqueen opened 2 years ago

clydemcqueen commented 2 years ago

In Foxy (though it looks like it's been in the code forever):

rqt_image_view segfaults during shutdown if there is an active subscription.

I'm using printf debugging and saw that ImageView::callbackImage is often called after ImageView::shutdownPlugin. There might be a better way to fix this, but it was easy to fix by adding bool shutting_down_ to guard the callback. Happy to provide a PR.

MatthijsBurgh commented 2 years ago

I am running on ros1, but I experience the same issue. But this also happens in other CPP rqt plugins. So it isn't related to rqt_image_view. I opened an issue, https://github.com/ros-visualization/qt_gui_core/issues/258

For me applying #58 to the ros1 code didn't solve it. Which is in line with my other observations.