gzclient under gazebo shows up empty; second gzclient works properly

Issue #456 closed
Brian Gerkey
created an issue

[I though that was already ticketed but couldn't find it.]

A bunch of us have been seeing the following problem: run gazebo with a certain world and get gzclient with an empty 3D view. No ground plane, no sun, no robot, just clouds. If you leave that running and start a second instance of gzclient, the second one works fine. Also, if you manipulate the world in the second gzclient (e.g., drag the robot, insert an object), the updated models start to appear in the original gzclient. It appears as though the first gzclient missed the "initial state" message and only gets diffs thereafter.

My machine is currently reproducing this problem reliably, as is John's. I'm using gazebo-prerelease-1.4.5 and drcsim-2.0.0 from debs. To reproduce:

. /usr/share/drcsim/setup.sh
roslaunch atlas_utils atlas.launch

I don't get the problem just running gazebo.

Giving high priority to this in the hopes that we can figure it out for Gazebo 1.4. The workaround is easy enough, but the behavior is annoying and non-intuitive (the first I encountered it, I thought that something had gone terribly wrong and spent time verifying compatibility among versions of everything before somebody told me that it's a known issue and that I just need to restart the client).

Happy to help debug if I'm pointed in the right direction.

Comments (6)

  1. Steven Peters

    EDIT: I can't reproduce that gzclient failure after re-building with the ROS version of OGRE; it might be a red herring.

    I just experienced this bug, and I noticed that the second gzclient did not exit cleanly when I closed it. The backtrace mentions some OGRE material problems. I'm using libogre-1.7.4 from the ubuntu deb.

    backtrace:

    $ gdb gzclient
    GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>...
    Reading symbols from /home/scpeters/local/bin/gzclient...done.
    (gdb) r
    Starting program: /home/scpeters/local/bin/gzclient 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7fffe4429700 (LWP 19945)]
    Gazebo multi-robot simulator, version 1.4.5
    Copyright (C) 2013 Open Source Robotics Foundation.
    Released under the Apache 2 License.
    http://gazebosim.org
    
    [New Thread 0x7fffe3c28700 (LWP 19946)]
    Msg Waiting for master
    Msg Connected to gazebo master @ http://127.0.0.1:11345
    Msg Publicized address: 192.168.1.67
    [New Thread 0x7fffe321a700 (LWP 19947)]
    [New Thread 0x7fffd3b9b700 (LWP 19948)]
    [New Thread 0x7fffcbfff700 (LWP 19949)]
    [New Thread 0x7fffd339a700 (LWP 19950)]
    [New Thread 0x7fffd2b99700 (LWP 19951)]
    [New Thread 0x7fffd2398700 (LWP 19952)]
    [New Thread 0x7fffd1b97700 (LWP 19953)]
    [New Thread 0x7fffd1396700 (LWP 19954)]
    [New Thread 0x7fffd0b95700 (LWP 19955)]
    [New Thread 0x7fffa66ac700 (LWP 19956)]
    [New Thread 0x7fffa5eab700 (LWP 19957)]
    [New Thread 0x7fffa4a3a700 (LWP 19958)]
    [New Thread 0x7fff96bbb700 (LWP 19960)]
    [Thread 0x7fffe321a700 (LWP 19947) exited]
    [Thread 0x7fffcbfff700 (LWP 19949) exited]
    [Thread 0x7fffd2b99700 (LWP 19951) exited]
    [Thread 0x7fffd339a700 (LWP 19950) exited]
    [Thread 0x7fffd1b97700 (LWP 19953) exited]
    [Thread 0x7fffd2398700 (LWP 19952) exited]
    [Thread 0x7fffd3b9b700 (LWP 19948) exited]
    [Thread 0x7fffd0b95700 (LWP 19955) exited]
    [Thread 0x7fffd1396700 (LWP 19954) exited]
    gzclient: /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp:26: boost::pthread::pthread_mutex_scoped_lock::pthread_mutex_scoped_lock(pthread_mutex_t*): Assertion `!pthread_mutex_lock(m)' failed.
    
    Program received signal SIGABRT, Aborted.
    0x00007ffff4040425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
    64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    (gdb) bt
    #0  0x00007ffff4040425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
    #1  0x00007ffff4043b8b in __GI_abort () at abort.c:91
    #2  0x00007ffff40390ee in __assert_fail_base (fmt=<optimized out>, 
        assertion=0x7ffff22f1d47 "!pthread_mutex_lock(m)", 
        file=0x7ffff22f1eb0 "/usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp", line=<optimized out>, 
        function=<optimized out>) at assert.c:94
    #3  0x00007ffff4039192 in __GI___assert_fail (assertion=0x7ffff22f1d47 "!pthread_mutex_lock(m)", 
        file=0x7ffff22f1eb0 "/usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp", line=26, 
        function=0x7ffff22f2920 "boost::pthread::pthread_mutex_scoped_lock::pthread_mutex_scoped_lock(pthread_mutex_t*)")
        at assert.c:103
    #4  0x00007ffff204a570 in boost::pthread::pthread_mutex_scoped_lock::pthread_mutex_scoped_lock (m_=<optimized out>, 
        this=<optimized out>) at /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp:26
    #5  0x00007ffff205e0fa in pthread_mutex_scoped_lock (m_=0x7ffff2642f20, this=<synthetic pointer>)
        at /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp:26
    #6  lock (this=0x7ffff2642f20) at /usr/include/boost/thread/pthread/recursive_mutex.hpp:124
    #7  boost::unique_lock<boost::recursive_mutex>::lock (this=0x7fffffffd2c0) at /usr/include/boost/thread/locks.hpp:412
    #8  0x00007ffff21aabcd in unique_lock (m_=..., this=0x7fffffffd2c0) at /usr/include/boost/thread/locks.hpp:290
    #9  Ogre::Pass::queueForDeletion (this=0x7fffe20b37a8) at /build/buildd/ogre-1.7.4/OgreMain/src/OgrePass.cpp:1653
    #10 0x00007ffff22ba864 in Ogre::Technique::removeAllPasses (this=0x7fffe20b3598)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreTechnique.cpp:396
    #11 0x00007ffff22bb6de in Ogre::Technique::~Technique (this=0x7fffe20b3598, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreTechnique.cpp:56
    #12 0x00007ffff2125600 in Ogre::Material::removeAllTechniques (this=0x7fffe20b3188)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreMaterial.cpp:431
    #13 0x00007ffff212566c in Ogre::Material::~Material (this=0x7fffe20b3188, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreMaterial.cpp:78
    #14 0x00007ffff21257f9 in Ogre::Material::~Material (this=0x7fffe20b3188, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreMaterial.cpp:82
    #15 0x00007ffff73279ff in Ogre::SharedPtr<Ogre::Material>::destroy (this=0x7fffe20a75d0)
        at /usr/include/OGRE/OgreSharedPtr.h:232
    ---Type <return> to continue, or q <return> to quit---
    #16 0x00007ffff21285d6 in release (this=0x7fffe20a75d0)
        at /build/buildd/ogre-1.7.4/OgreMain/include/OgreSharedPtr.h:218
    #17 setNull (this=0x7fffe20a75d0) at /build/buildd/ogre-1.7.4/OgreMain/include/OgreSharedPtr.h:189
    #18 Ogre::MaterialManager::~MaterialManager (this=0x7fffe20a7418, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreMaterialManager.cpp:97
    #19 0x00007ffff2128959 in Ogre::MaterialManager::~MaterialManager (this=0x7fffe20a7418, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreMaterialManager.cpp:106
    #20 0x00007ffff220c4e6 in Ogre::Root::~Root (this=0x7fffe209f8d8, __in_chrg=<optimized out>)
        at /build/buildd/ogre-1.7.4/OgreMain/src/OgreRoot.cpp:333
    #21 0x00007ffff735685d in gazebo::rendering::RenderEngine::Fini (this=0x7ffff75ef040)
        at /home/scpeters/osrf/gazebo_1.4/gazebo/rendering/RenderEngine.cc:306
    #22 0x00007ffff735e559 in gazebo::rendering::fini ()
        at /home/scpeters/osrf/gazebo_1.4/gazebo/rendering/Rendering.cc:63
    #23 0x00000000004c3cbe in gazebo::gui::fini () at /home/scpeters/osrf/gazebo_1.4/gazebo/gui/Gui.cc:164
    #24 0x00000000004c483b in gazebo::gui::run (_argc=1, _argv=0x7fffffffd5d8)
        at /home/scpeters/osrf/gazebo_1.4/gazebo/gui/Gui.cc:198
    #25 0x00000000004a57e9 in main (_argc=<optimized out>, _argv=<optimized out>)
        at /home/scpeters/osrf/gazebo_1.4/gazebo/gui/main.cc:23
    (gdb) 
    

    ldd which gzclient | grep -i ogre

    libOgreRTShaderSystem.so.1.7.4 => /usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so.1.7.4 (0x00007fe7b6a15000)
        libOgreMain.so.1.7.4 => /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.7.4 (0x00007fe7b6265000)
        libOgreTerrain.so.1.7.4 => /usr/lib/x86_64-linux-gnu/libOgreTerrain.so.1.7.4 (0x00007fe7b5fec000)
        libOgrePaging.so.1.7.4 => /usr/lib/x86_64-linux-gnu/libOgrePaging.so.1.7.4 (0x00007fe7b054e000)
    
  2. Log in to comment