osrf / robocup3ds

Gazebo support for the RoboCup 3D simulation league.
11 stars 2 forks source link

Reconnect client after disconnect with same agent uNum and teamname causes crash #16

Closed osrf-migration closed 8 years ago

osrf-migration commented 8 years ago

Original report (archived issue) by jasonzliang NA (Bitbucket: jasonzliang).


To reproduce the problem, simply take the magma-protocol-tester from issue 12 (http://chaosscripting.net/files/magma-protocol-tester.zip), then:
start gazebo with robocup3ds plugin and run the magma-protocol-tester GUI

  1. connect an agent ("connect" button)
  2. initialize it ("Send init" button) (after that confirm that the agent shows up in the simulator)
    hit the "disconnect" button
  3. connect an agent again and send the exact same init message as before

The cause of the crash is due to the removal the agent's world model object from Gazebo after the client has reconnected. The reason for this is unknown and does not seem to be caused by the robocup plugin.

This issue only happens under very specific conditions: immediate after the server is started, you disconnect and reconnect with the exact same team name and agent uNum. If you connect an agent with different uNum or teamname in between steps 2 and 3, the problem does not occur. Afterwards, any attempt to reproduce the crash by following the steps above will not happen either.

The error message:

#!c++

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::Model; typename boost::detail::sp_member_access<T>::type = gazebo::physics::Model*]: Assertion `px != 0' failed.
osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


Temporary fix: https://osrf-migration.github.io/osrf-projects-gh-pages/#!/osrf/robocup3ds/pull-requests/44/temp-fix-for-issue-16/diff

osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by jasonzliang NA (Bitbucket: jasonzliang).


osrf-migration commented 8 years ago

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


Fixed in pull request #45 by moving to Gazebo 7