ros-perception / opencv_apps

http://wiki.ros.org/opencv_apps
64 stars 70 forks source link

Add sync_.reset/async_.reset to destructor in face_recognition #139

Closed nakane11 closed 2 years ago

nakane11 commented 2 years ago

When the nodelet is killed, the following error is raised.

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

To delete sync_ and async_ before subscribers, we can reset SyncPolicy in ~FaceRecognitionNodelet() or change the order of declaration.