rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
684 stars 339 forks source link

Fix log; pinfo->_pviewer cannot be used here #1378

Closed cielavenir closed 2 months ago

cielavenir commented 2 months ago

This issue was found while I was testing 13523c3d7c870648297fad4f0bf13d061a3e775e.

This fixes nullpointer exception on LOG_WARN.

However this was shown:

2024-04-30 09:40:53,355 openrave [DEBUG] [qtosgviewer.cpp:210 QtOSGViewer::~QtO
SGViewer] env=1, destroying qtosg viewer
2024-04-30 09:40:53,360 openrave [WARN] [openravepy_int.cpp:758 ViewerManager::
_RunViewerThread] env=1, failed to create viewer 'qtosg ': openrave (Assert): [
/usr/include/boost/smart_ptr/shared_ptr.hpp:728] -> typename boost::detail::sp_
member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = RaveP
lugin; typename boost::detail::sp_member_access<T>::type = RavePlugin*], expr: 
px != 0

( full slave log and command: log.gpg.gz (decompress by gzip -d | mugpg -d | tar x) )

I don't know how the RavePlugin was destructed and https://github.com/rdiankov/openrave/blob/master/src/libopenrave/plugindatabase_virtual.cpp#L126 plugin->GetPluginPath(); failed though.

cielavenir commented 2 months ago

@rdiankov I hope this MR can help your debugging https://github.com/rdiankov/openrave/commit/8d91415b4b515e62736ed024a314659607101647 further.

rdiankov commented 2 months ago

thanks~