gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.18k stars 479 forks source link

gzclient Segmentation Fault on exit when a camera is present #1470

Open osrf-migration opened 9 years ago

osrf-migration commented 9 years ago

Original report (archived issue) by Hugo Boyer (Bitbucket: hugomatic, GitHub: hugomatic).


Steps:

Here's a back trace:

#!c++

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff63bc680 in gazebo::rendering::Camera::~Camera (this=0x4db14a0, 
    __in_chrg=<optimized out>)
    at /home/hugo/code/gazebo-rest-web/gazebo/rendering/Camera.cc:127
#2  0x00007ffff63bc979 in gazebo::rendering::Camera::~Camera (this=0x4db14a0, 
    __in_chrg=<optimized out>)
    at /home/hugo/code/gazebo-rest-web/gazebo/rendering/Camera.cc:138
#3  0x00007ffff63b3d9e in boost::detail::sp_counted_base::release (
    this=0x4daffa0)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#4  0x00007ffff63d34f6 in ~shared_count (this=<optimized out>, 
    __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#5  ~shared_ptr (this=<optimized out>, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
#6  reset (this=0x4da6640) at /usr/include/boost/smart_ptr/shared_ptr.hpp:619
#7  gazebo::rendering::CameraVisual::~CameraVisual (this=0x4d9ce10, 
    __in_chrg=<optimized out>)
    at /home/hugo/code/gazebo-rest-web/gazebo/rendering/CameraVisual.cc:46
#8  0x00007ffff63d3529 in gazebo::rendering::CameraVisual::~CameraVisual (
    this=0x4d9ce10, __in_chrg=<optimized out>)
    at /home/hugo/code/gazebo-rest-web/gazebo/rendering/CameraVisual.cc:47
#9  0x00007ffff63b3d9e in boost::detail::sp_counted_base::release (
    this=0x4db1c10)
    at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#10 0x00007ffff646db9e in ~shared_count (this=0x4dbb168, 
    __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#11 ~shared_ptr (this=0x4dbb160, __in_chrg=<optimized out>)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
#12 ~value (this=0x4dbb160, __in_chrg=<optimized out>)
    at /usr/include/boost/bind/bind.hpp:112
#13 ~storage1 (this=0x4dbb160, __in_chrg=<optimized out>)
    at /usr/include/boost/bind/storage.hpp:40
#14 ~list1 (this=0x4dbb160, __in_chrg=<optimized out>)
    at /usr/include/boost/bind/bind.hpp:217
#15 ~bind_t (this=0x4dbb150, __in_chrg=<optimized out>)
    at /usr/include/boost/bind/bind.hpp:864
#16 manager (op=<optimized out>, out_buffer=..., in_buffer=...)
    at /usr/include/boost/function/function_base.hpp:389
#17 manager (op=<optimized out>, out_buffer=..., in_buffer=...)
    at /usr/include/boost/function/function_base.hpp:412
#18 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf0<void, gazebo::rendering::Visual>, boost::_bi::list1<boost::_bi::value<boost::shared_ptr<gazebo::rendering::Visual> > > > >::manage (in_buffer=..., 
    out_buffer=..., op=<optimized out>)
    at /usr/include/boost/function/function_base.hpp:440
#19 0x00007ffff7796e6f in clear (this=<optimized out>, functor=...)
    at /usr/include/boost/function/function_template.hpp:504
#20 clear (this=0x4d9bfd0)
    at /usr/include/boost/function/function_template.hpp:877
#21 ~function0 (this=0x4d9bfd0, __in_chrg=<optimized out>)
    at /usr/include/boost/function/function_template.hpp:759
---Type <return> to continue, or q <return> to quit--- 
#22 ~function (this=0x4d9bfd0, __in_chrg=<optimized out>)
    at /usr/include/boost/function/function_template.hpp:1048
#23 gazebo::event::EventT<void ()>::~EventT() (
    this=0x7ffff6c046e0 <gazebo::event::Events::preRender>, 
    __in_chrg=<optimized out>)
    at /home/hugo/code/gazebo-rest-web/gazebo/common/Event.hh:568
#24 0x00007ffff6c415ea in __cxa_finalize (d=0x7ffff6c03d68)
    at cxa_finalize.c:56
#25 0x00007ffff698b8e3 in __do_global_dtors_aux ()
   from /home/hugo/local/lib/x86_64-linux-gnu/libgazebo_common.so.6
#26 0x00007fffffffdc90 in ?? ()
#27 0x00007ffff7dea73a in _dl_fini () at dl-fini.c:252
Backtrace stopped: frame did not save the PC
(gdb) 

Using the default branch, Gazebo multi-robot simulator, version 6.0.0

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


This happens with the gazebo 5.0.1 deb as well.

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It fails at gazebo/rendering/Camera.cc:127:

    this->scene->GetManager()->destroyCamera(this->scopedUniqueName);
osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).