Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Robot with Custom Plugin locks up gzclient

I have a custom plugin that is designed to drive a robot via protobuf messages.

When I place this robot into an empty world, it begins locking out gzclient - while gzserver keeps running fine.

The run of gzclient looks like this:

Starting program: /usr/bin/gzclient-2.2.2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xafbb8b40 (LWP 6831)]
Gazebo multi-robot simulator, version 2.2.2
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[New Thread 0xaefffb40 (LWP 6832)]
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.18.104.83
[New Thread 0xae5ffb40 (LWP 6833)]
[New Thread 0xabc96b40 (LWP 6834)]
[New Thread 0xab295b40 (LWP 6835)]
[New Thread 0xaa894b40 (LWP 6836)]
[New Thread 0xa9e93b40 (LWP 6837)]
[New Thread 0xa9492b40 (LWP 6838)]
[New Thread 0xa8a91b40 (LWP 6839)]
[New Thread 0xa8090b40 (LWP 6840)]
[New Thread 0xa788fb40 (LWP 6841)]
[New Thread 0xa6238b40 (LWP 6842)]
[New Thread 0xa58ffb40 (LWP 6843)]
[New Thread 0xa4de3b40 (LWP 6844)]
[New Thread 0xa41ffb40 (LWP 6845)]
[New Thread 0xa3ffeb40 (LWP 6846)]
[New Thread 0xa39feb40 (LWP 6848)]
[New Thread 0xa3bffb40 (LWP 6847)]
[New Thread 0xa35fcb40 (LWP 6849)]
[New Thread 0xa33fbb40 (LWP 6851)]
[New Thread 0xa37fdb40 (LWP 6850)]
[Thread 0xa6238b40 (LWP 6842) exited]
^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()

The CTRL-C comes after it has locked out for at least a minute.

The backtrace:

(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb6a3084b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xb7edeadc in wait (m=..., this=<optimized out>)
    at /usr/include/boost/thread/pthread/condition_variable.hpp:56
#3  gazebo::transport::request (_worldName=..., _request=..., _data=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/transport/TransportIface.cc:203
#4  0x0810a376 in gazebo::gui::JointControlWidget::SetModelName (this=0x8b39c70, _modelName=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/JointControlWidget.cc:256
#5  0x08161ea6 in gazebo::gui::ToolsWidget::OnSetSelectedEntity (this=0x8b397c0, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/ToolsWidget.cc:76
#6  0x08162500 in operator() (a2=..., a1=..., p=<optimized out>, this=0x8b51024)
    at /usr/include/boost/bind/mem_fn_template.hpp:280
#7  operator()<boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, const std::basic_string<char>&, const std::basic_string<char>&>, boost::_bi::list2<std::basic_string<char>&, std::basic_string<char>&> > (
    a=<synthetic pointer>, f=..., this=0x8b5102c) at /usr/include/boost/bind/bind.hpp:392
#8  operator()<std::basic_string<char>, std::basic_string<char> > (a2=..., a1=..., this=0x8b51024)
    at /usr/include/boost/bind/bind_template.hpp:61
#9  boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, std::string const&, std::string const&>, boost::_bi::list3<boost::_bi::value<gazebo::gui::ToolsWidget*>, boost::arg<1>, boost::arg<2> > >, void, std::string, std::string>::invoke (function_obj_ptr=..., a0=..., a1=...) at /usr/include/boost/function/function_template.hpp:153
#10 0x080f450e in operator() (a1=..., a0=..., this=0x8b51020)
    at /usr/include/boost/function/function_template.hpp:760
#11 gazebo::event::EventT<void (std::string, std::string)>::Signal<std::string, char [7]>(std::string const&, char const (&) [7]) (this=0xb7fc0540 <gazebo::event::Events::setSelectedEntity>, _p1=..., 
    _p2=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:276
#12 0x080eef36 in operator()<std::basic_string<char>, char [7]> (_p2=..., _p1=..., 
    this=<optimized out>) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:141
#13 gazebo::gui::GLWidget::OnMouseReleaseNormal (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:587
#14 0x080ef0c8 in gazebo::gui::GLWidget::OnMouseRelease (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:411
#15 0x080f39d8 in operator() (a1=..., p=<optimized out>, this=0x8bca5b8)
    at /usr/include/boost/bind/mem_fn_template.hpp:165
#16 operator()<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, const gazebo::common::MouseEvent&>, boost::_bi::list1<const gazebo::common::MouseEvent&> > (a=<synthetic pointer>, f=..., 
    this=0x8bca5c0) at /usr/include/boost/bind/bind.hpp:303
#17 operator()<gazebo::common::MouseEvent> (a1=..., this=0x8bca5b8)
    at /usr/include/boost/bind/bind_template.hpp:47
#18 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, gazebo::common::MouseEvent const&>, boost::_bi::list2<boost::_bi::value<gazebo::gui::GLWidget*>, boost::arg<1> > >, bool, gazebo::common::MouseEvent const&>::invoke (
    function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:132
#19 0x0815d6c5 in operator() (a0=..., this=0x8bca5b4)
    at /usr/include/boost/function/function_template.hpp:760
#20 gazebo::gui::MouseEventHandler::Handle (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=..., _list=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:115
#21 0x0815d7ca in gazebo::gui::MouseEventHandler::HandleRelease (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:81
#22 0x080ee3f5 in gazebo::gui::GLWidget::mouseReleaseEvent (this=0x8bb2f58, _event=0xbfffe464)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:555
#23 0xb6eba710 in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6e63c7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6e67587 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb6bbb90e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#27 0xb6e6a823 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0xb6eec735 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb6eeb525 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb6f1a904 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0xb44ab3b3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0xb44ab750 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0xb44ab831 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0xb6bedc21 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb6f1aa0a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0xb6bba3ec in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#37 0xb6bba6e1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#38 0xb6bc03fa in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#39 0xb6e61fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0x080fa7ad in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GuiIface.cc:210
#41 0x080d9ec7 in main (_argc=1, _argv=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/main.cc:23

Any help would be greatly appreciated.

Robot with Custom Plugin locks up gzclient

I have a custom plugin that is designed to drive a robot via protobuf messages.

When I place this robot into an empty world, it begins locking out gzclient - while gzserver keeps running fine.

The run of gzclient looks like this:

Starting program: /usr/bin/gzclient-2.2.2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xafbb8b40 (LWP 6831)]
Gazebo multi-robot simulator, version 2.2.2
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[New Thread 0xaefffb40 (LWP 6832)]
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.18.104.83
[New Thread 0xae5ffb40 (LWP 6833)]
[New Thread 0xabc96b40 (LWP 6834)]
[New Thread 0xab295b40 (LWP 6835)]
[New Thread 0xaa894b40 (LWP 6836)]
[New Thread 0xa9e93b40 (LWP 6837)]
[New Thread 0xa9492b40 (LWP 6838)]
[New Thread 0xa8a91b40 (LWP 6839)]
[New Thread 0xa8090b40 (LWP 6840)]
[New Thread 0xa788fb40 (LWP 6841)]
[New Thread 0xa6238b40 (LWP 6842)]
[New Thread 0xa58ffb40 (LWP 6843)]
[New Thread 0xa4de3b40 (LWP 6844)]
[New Thread 0xa41ffb40 (LWP 6845)]
[New Thread 0xa3ffeb40 (LWP 6846)]
[New Thread 0xa39feb40 (LWP 6848)]
[New Thread 0xa3bffb40 (LWP 6847)]
[New Thread 0xa35fcb40 (LWP 6849)]
[New Thread 0xa33fbb40 (LWP 6851)]
[New Thread 0xa37fdb40 (LWP 6850)]
[Thread 0xa6238b40 (LWP 6842) exited]
^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()

The CTRL-C comes after it has locked out for at least a minute.

The backtrace:

(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb6a3084b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xb7edeadc in wait (m=..., this=<optimized out>)
    at /usr/include/boost/thread/pthread/condition_variable.hpp:56
#3  gazebo::transport::request (_worldName=..., _request=..., _data=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/transport/TransportIface.cc:203
#4  0x0810a376 in gazebo::gui::JointControlWidget::SetModelName (this=0x8b39c70, _modelName=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/JointControlWidget.cc:256
#5  0x08161ea6 in gazebo::gui::ToolsWidget::OnSetSelectedEntity (this=0x8b397c0, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/ToolsWidget.cc:76
#6  0x08162500 in operator() (a2=..., a1=..., p=<optimized out>, this=0x8b51024)
    at /usr/include/boost/bind/mem_fn_template.hpp:280
#7  operator()<boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, const std::basic_string<char>&, const std::basic_string<char>&>, boost::_bi::list2<std::basic_string<char>&, std::basic_string<char>&> > (
    a=<synthetic pointer>, f=..., this=0x8b5102c) at /usr/include/boost/bind/bind.hpp:392
#8  operator()<std::basic_string<char>, std::basic_string<char> > (a2=..., a1=..., this=0x8b51024)
    at /usr/include/boost/bind/bind_template.hpp:61
#9  boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, std::string const&, std::string const&>, boost::_bi::list3<boost::_bi::value<gazebo::gui::ToolsWidget*>, boost::arg<1>, boost::arg<2> > >, void, std::string, std::string>::invoke (function_obj_ptr=..., a0=..., a1=...) at /usr/include/boost/function/function_template.hpp:153
#10 0x080f450e in operator() (a1=..., a0=..., this=0x8b51020)
    at /usr/include/boost/function/function_template.hpp:760
#11 gazebo::event::EventT<void (std::string, std::string)>::Signal<std::string, char [7]>(std::string const&, char const (&) [7]) (this=0xb7fc0540 <gazebo::event::Events::setSelectedEntity>, _p1=..., 
    _p2=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:276
#12 0x080eef36 in operator()<std::basic_string<char>, char [7]> (_p2=..., _p1=..., 
    this=<optimized out>) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:141
#13 gazebo::gui::GLWidget::OnMouseReleaseNormal (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:587
#14 0x080ef0c8 in gazebo::gui::GLWidget::OnMouseRelease (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:411
#15 0x080f39d8 in operator() (a1=..., p=<optimized out>, this=0x8bca5b8)
    at /usr/include/boost/bind/mem_fn_template.hpp:165
#16 operator()<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, const gazebo::common::MouseEvent&>, boost::_bi::list1<const gazebo::common::MouseEvent&> > (a=<synthetic pointer>, f=..., 
    this=0x8bca5c0) at /usr/include/boost/bind/bind.hpp:303
#17 operator()<gazebo::common::MouseEvent> (a1=..., this=0x8bca5b8)
    at /usr/include/boost/bind/bind_template.hpp:47
#18 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, gazebo::common::MouseEvent const&>, boost::_bi::list2<boost::_bi::value<gazebo::gui::GLWidget*>, boost::arg<1> > >, bool, gazebo::common::MouseEvent const&>::invoke (
    function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:132
#19 0x0815d6c5 in operator() (a0=..., this=0x8bca5b4)
    at /usr/include/boost/function/function_template.hpp:760
#20 gazebo::gui::MouseEventHandler::Handle (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=..., _list=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:115
#21 0x0815d7ca in gazebo::gui::MouseEventHandler::HandleRelease (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:81
#22 0x080ee3f5 in gazebo::gui::GLWidget::mouseReleaseEvent (this=0x8bb2f58, _event=0xbfffe464)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:555
#23 0xb6eba710 in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6e63c7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6e67587 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb6bbb90e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#27 0xb6e6a823 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0xb6eec735 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb6eeb525 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb6f1a904 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0xb44ab3b3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0xb44ab750 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0xb44ab831 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0xb6bedc21 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb6f1aa0a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0xb6bba3ec in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#37 0xb6bba6e1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#38 0xb6bc03fa in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#39 0xb6e61fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0x080fa7ad in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GuiIface.cc:210
#41 0x080d9ec7 in main (_argc=1, _argv=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/main.cc:23

Another BT, ended earlier before a total lockout - if I don't click on the robot directly, it doesn't crash completely, just doesn't speak to the gzserver.

#0  0xb7df67b9 in atomic_exchange_and_add (dv=-1, pw=0x15)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:50
#1  release (this=0x11) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:143
#2  ~shared_count (this=0xa806754, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/detail/shared_count.hpp:305
#3  ~shared_ptr (this=0xa806750, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:164
#4  destroy (__p=0xa806750, this=<optimized out>) at /usr/include/c++/4.7/ext/new_allocator.h:123
#5  destroy (__p=0xa806750, __a=...) at /usr/include/c++/4.7/ext/alloc_traits.h:206
#6  std::vector<boost::shared_ptr<gazebo::rendering::Visual>, std::allocator<boost::shared_ptr<gazebo::rendering::Visual> > >::erase (this=this@entry=0xa8f93a0, __position=__position@entry=...)
    at /usr/include/c++/4.7/bits/vector.tcc:141
#7  0xb7de5a71 in gazebo::rendering::Visual::DetachVisual (this=0xa8f9330, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Visual.cc:600
#8  0xb7de5c2a in gazebo::rendering::Visual::Fini (this=0xa903038)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Visual.cc:164
#9  0xb7dabdc1 in gazebo::rendering::Scene::RemoveVisual (this=0x8bd9918, _vis=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Scene.cc:2699
#10 0xb7db291d in gazebo::rendering::Scene::Clear (this=0x8bd9918)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Scene.cc:189
#11 0xb7d94951 in gazebo::rendering::RenderEngine::RemoveScene (
    this=this@entry=0x833d980 <SingletonT<gazebo::rendering::RenderEngine>::GetInstance()::t>, 
    _name=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderEngine.cc:218
#12 0xb7d94a5d in gazebo::rendering::RenderEngine::Fini (
    this=this@entry=0x833d980 <SingletonT<gazebo::rendering::RenderEngine>::GetInstance()::t>)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderEngine.cc:326
#13 0xb7d9ec83 in gazebo::rendering::fini ()
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderingIface.cc:66
#14 0xb4632e3c in gazebo::sensors::fini ()
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/sensors/SensorsIface.cc:71
#15 0xb783dec8 in gazebo::shutdown () at /tmp/buildd/gazebo-current-2.2.2/gazebo/gazebo.cc:248
#16 0x08111ccc in gazebo::gui::MainWindow::closeEvent (this=0x888fb60)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MainWindow.cc:240
#17 0xb6eb9f9f in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#18 0xb72eb46c in QMainWindow::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#19 0xb6e63c7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#20 0xb6e66bfa in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#21 0xb6bbb90e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#22 0xb6eb98d0 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#23 0xb6eda276 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6edd2ea in QApplication::x11ClientMessage(QWidget*, _XEvent*, bool) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6eeb293 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb6f1a904 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#27 0xb44ab3b3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#28 0xb44ab750 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#29 0xb44ab831 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#30 0xb6bedc3f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#31 0xb6f1aa0a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#32 0xb6bba3ec in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#33 0xb6bba6e1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#34 0xb6bc03fa in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb6e61fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0x080fa7ad in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GuiIface.cc:210
#37 0x080d9ec7 in main (_argc=1, _argv=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/main.cc:23

Any help would be greatly appreciated.

Robot with Custom Plugin locks up gzclient

I have a custom plugin that is designed to drive a robot via protobuf messages.

When I place this robot into an empty world, it begins locking out gzclient - while gzserver keeps running fine.

The run of gzclient looks like this:

Starting program: /usr/bin/gzclient-2.2.2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xafbb8b40 (LWP 6831)]
Gazebo multi-robot simulator, version 2.2.2
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[New Thread 0xaefffb40 (LWP 6832)]
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.18.104.83
[New Thread 0xae5ffb40 (LWP 6833)]
[New Thread 0xabc96b40 (LWP 6834)]
[New Thread 0xab295b40 (LWP 6835)]
[New Thread 0xaa894b40 (LWP 6836)]
[New Thread 0xa9e93b40 (LWP 6837)]
[New Thread 0xa9492b40 (LWP 6838)]
[New Thread 0xa8a91b40 (LWP 6839)]
[New Thread 0xa8090b40 (LWP 6840)]
[New Thread 0xa788fb40 (LWP 6841)]
[New Thread 0xa6238b40 (LWP 6842)]
[New Thread 0xa58ffb40 (LWP 6843)]
[New Thread 0xa4de3b40 (LWP 6844)]
[New Thread 0xa41ffb40 (LWP 6845)]
[New Thread 0xa3ffeb40 (LWP 6846)]
[New Thread 0xa39feb40 (LWP 6848)]
[New Thread 0xa3bffb40 (LWP 6847)]
[New Thread 0xa35fcb40 (LWP 6849)]
[New Thread 0xa33fbb40 (LWP 6851)]
[New Thread 0xa37fdb40 (LWP 6850)]
[Thread 0xa6238b40 (LWP 6842) exited]
^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()

The CTRL-C comes after it has locked out for at least a minute.

The backtrace:

(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb6a3084b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xb7edeadc in wait (m=..., this=<optimized out>)
    at /usr/include/boost/thread/pthread/condition_variable.hpp:56
#3  gazebo::transport::request (_worldName=..., _request=..., _data=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/transport/TransportIface.cc:203
#4  0x0810a376 in gazebo::gui::JointControlWidget::SetModelName (this=0x8b39c70, _modelName=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/JointControlWidget.cc:256
#5  0x08161ea6 in gazebo::gui::ToolsWidget::OnSetSelectedEntity (this=0x8b397c0, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/ToolsWidget.cc:76
#6  0x08162500 in operator() (a2=..., a1=..., p=<optimized out>, this=0x8b51024)
    at /usr/include/boost/bind/mem_fn_template.hpp:280
#7  operator()<boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, const std::basic_string<char>&, const std::basic_string<char>&>, boost::_bi::list2<std::basic_string<char>&, std::basic_string<char>&> > (
    a=<synthetic pointer>, f=..., this=0x8b5102c) at /usr/include/boost/bind/bind.hpp:392
#8  operator()<std::basic_string<char>, std::basic_string<char> > (a2=..., a1=..., this=0x8b51024)
    at /usr/include/boost/bind/bind_template.hpp:61
#9  boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, std::string const&, std::string const&>, boost::_bi::list3<boost::_bi::value<gazebo::gui::ToolsWidget*>, boost::arg<1>, boost::arg<2> > >, void, std::string, std::string>::invoke (function_obj_ptr=..., a0=..., a1=...) at /usr/include/boost/function/function_template.hpp:153
#10 0x080f450e in operator() (a1=..., a0=..., this=0x8b51020)
    at /usr/include/boost/function/function_template.hpp:760
#11 gazebo::event::EventT<void (std::string, std::string)>::Signal<std::string, char [7]>(std::string const&, char const (&) [7]) (this=0xb7fc0540 <gazebo::event::Events::setSelectedEntity>, _p1=..., 
    _p2=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:276
#12 0x080eef36 in operator()<std::basic_string<char>, char [7]> (_p2=..., _p1=..., 
    this=<optimized out>) at /tmp/buildd/gazebo-current-2.2.2/gazebo/common/Event.hh:141
#13 gazebo::gui::GLWidget::OnMouseReleaseNormal (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:587
#14 0x080ef0c8 in gazebo::gui::GLWidget::OnMouseRelease (this=0x8bb2f58)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:411
#15 0x080f39d8 in operator() (a1=..., p=<optimized out>, this=0x8bca5b8)
    at /usr/include/boost/bind/mem_fn_template.hpp:165
#16 operator()<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, const gazebo::common::MouseEvent&>, boost::_bi::list1<const gazebo::common::MouseEvent&> > (a=<synthetic pointer>, f=..., 
    this=0x8bca5c0) at /usr/include/boost/bind/bind.hpp:303
#17 operator()<gazebo::common::MouseEvent> (a1=..., this=0x8bca5b8)
    at /usr/include/boost/bind/bind_template.hpp:47
#18 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, gazebo::gui::GLWidget, gazebo::common::MouseEvent const&>, boost::_bi::list2<boost::_bi::value<gazebo::gui::GLWidget*>, boost::arg<1> > >, bool, gazebo::common::MouseEvent const&>::invoke (
    function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:132
#19 0x0815d6c5 in operator() (a0=..., this=0x8bca5b4)
    at /usr/include/boost/function/function_template.hpp:760
#20 gazebo::gui::MouseEventHandler::Handle (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=..., _list=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:115
#21 0x0815d7ca in gazebo::gui::MouseEventHandler::HandleRelease (
    this=this@entry=0x833d958 <SingletonT<gazebo::gui::MouseEventHandler>::GetInstance()::t>, 
    _event=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MouseEventHandler.cc:81
#22 0x080ee3f5 in gazebo::gui::GLWidget::mouseReleaseEvent (this=0x8bb2f58, _event=0xbfffe464)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GLWidget.cc:555
#23 0xb6eba710 in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6e63c7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6e67587 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb6bbb90e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#27 0xb6e6a823 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0xb6eec735 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb6eeb525 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb6f1a904 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0xb44ab3b3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0xb44ab750 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0xb44ab831 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0xb6bedc21 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb6f1aa0a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0xb6bba3ec in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#37 0xb6bba6e1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#38 0xb6bc03fa in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#39 0xb6e61fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0x080fa7ad in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GuiIface.cc:210
#41 0x080d9ec7 in main (_argc=1, _argv=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/main.cc:23

Another BT, ended earlier before a total lockout - if I don't click on the robot directly, it doesn't crash completely, just doesn't speak to the gzserver.

#0  0xb7df67b9 in atomic_exchange_and_add (dv=-1, pw=0x15)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:50
#1  release (this=0x11) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:143
#2  ~shared_count (this=0xa806754, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/detail/shared_count.hpp:305
#3  ~shared_ptr (this=0xa806750, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:164
#4  destroy (__p=0xa806750, this=<optimized out>) at /usr/include/c++/4.7/ext/new_allocator.h:123
#5  destroy (__p=0xa806750, __a=...) at /usr/include/c++/4.7/ext/alloc_traits.h:206
#6  std::vector<boost::shared_ptr<gazebo::rendering::Visual>, std::allocator<boost::shared_ptr<gazebo::rendering::Visual> > >::erase (this=this@entry=0xa8f93a0, __position=__position@entry=...)
    at /usr/include/c++/4.7/bits/vector.tcc:141
#7  0xb7de5a71 in gazebo::rendering::Visual::DetachVisual (this=0xa8f9330, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Visual.cc:600
#8  0xb7de5c2a in gazebo::rendering::Visual::Fini (this=0xa903038)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Visual.cc:164
#9  0xb7dabdc1 in gazebo::rendering::Scene::RemoveVisual (this=0x8bd9918, _vis=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Scene.cc:2699
#10 0xb7db291d in gazebo::rendering::Scene::Clear (this=0x8bd9918)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/Scene.cc:189
#11 0xb7d94951 in gazebo::rendering::RenderEngine::RemoveScene (
    this=this@entry=0x833d980 <SingletonT<gazebo::rendering::RenderEngine>::GetInstance()::t>, 
    _name=...) at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderEngine.cc:218
#12 0xb7d94a5d in gazebo::rendering::RenderEngine::Fini (
    this=this@entry=0x833d980 <SingletonT<gazebo::rendering::RenderEngine>::GetInstance()::t>)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderEngine.cc:326
#13 0xb7d9ec83 in gazebo::rendering::fini ()
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/rendering/RenderingIface.cc:66
#14 0xb4632e3c in gazebo::sensors::fini ()
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/sensors/SensorsIface.cc:71
#15 0xb783dec8 in gazebo::shutdown () at /tmp/buildd/gazebo-current-2.2.2/gazebo/gazebo.cc:248
#16 0x08111ccc in gazebo::gui::MainWindow::closeEvent (this=0x888fb60)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/MainWindow.cc:240
#17 0xb6eb9f9f in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#18 0xb72eb46c in QMainWindow::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#19 0xb6e63c7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#20 0xb6e66bfa in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#21 0xb6bbb90e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#22 0xb6eb98d0 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#23 0xb6eda276 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6edd2ea in QApplication::x11ClientMessage(QWidget*, _XEvent*, bool) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6eeb293 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb6f1a904 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#27 0xb44ab3b3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#28 0xb44ab750 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#29 0xb44ab831 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#30 0xb6bedc3f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#31 0xb6f1aa0a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#32 0xb6bba3ec in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#33 0xb6bba6e1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#34 0xb6bc03fa in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb6e61fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0x080fa7ad in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/GuiIface.cc:210
#37 0x080d9ec7 in main (_argc=1, _argv=0xbfffefc4)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/main.cc:23

Any help would be greatly appreciated.

EDIT:

Further data. I've narrowed this problem down to post the transport::run() call in the following code. Post call, the world update stops ticking over/communicating with the gzclient.

// Get the world name.
this->world = _parent->GetWorld();
this->model = _parent;
this->world->EnablePhysicsEngine(true);

//Start up the transport system
if (!transport::init())
{
    std::cout << "Transport init failed!" << std::endl;
    return;
}
transport::run();
std::cout << "Transport is running?!" << std::endl;