Gazebo crashes, Assertion `px != 0' failed

asked 2014-10-07 18:43:05 -0600

NickDP gravatar image

I have a model plugin that both publishes and subscribes to several topics. The plugin works fine, generally, but every now and then it crashes with the following message:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<T>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

This happens after the plugin has run for a while and nothing 'new' happens, i.e. the same code that has been successfully executed hundreds of times but now suddenly causes an error. I can run the exact same simulation many times without an error, making this very difficult to debug.

The code where I believe the error occurs is as follows:

messageStringStream << "(" << this->jointCountMovable << ")";

for(int jointIt = 0; jointIt < this->jointCountMovable; jointIt++)
    physics::JointPtr currentJoint =

    messageStringStream << "[";
    messageStringStream << movableJointNames[jointIt];
    messageStringStream << ":";
    messageStringStream << currentJoint->GetAngle(0);
    messageStringStream << "]";

msgs::GzString positionMessage;

Can somebody point me in the direction I need to be looking to solve this?


edit retag flag offensive close merge delete


I am dealing with a similar error. Did you find any solution? gravatar ( 2017-07-14 11:51:25 -0600 )edit