rviz EnumProperty related segfault [closed]

asked 2012-12-07 10:13:33 -0500

brice rebsamen gravatar image

updated 2012-12-07 11:03:49 -0500

Hi

I am writing my own rviz display plugin. I wrote a few, but this is the first one that I am writing that has an EnumProperty. When I quit rviz or delete my display, a segmentation fault happens.

I comment the EnumProperty and everything is fine. Simply adding an EnumPropertyWPtr member in my class (ImageryDisplay) definition causes the problem, so it has nothing to do with how I construct it or use it.

GDB does not give me much information, except that it happens in the Display destructor:

#0  0x0012d422 in __kernel_vsyscall ()
#1  0x0204c681 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0204fab2 in *__GI_abort () at abort.c:92
#3  0x0208624d in __libc_message (do_abort=2, fmt=0x215de58 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#4  0x02090341 in malloc_printerr (action=<value optimized out>, str=0x6 <Address 0x6 out of bounds>, ptr=0xac061e58) at malloc.c:6266
#5  0x02091b98 in _int_free (av=<value optimized out>, p=<value optimized out>) at malloc.c:4794
#6  0x02094c7d in *__GI___libc_free (mem=0xac061e58) at malloc.c:3738
#7  0x01fa3741 in operator delete(void*) () from /usr/lib/libstdc++.so.6
#8  0x00f09a84 in ros::NodeHandle::destruct (this=0xac061d20) at /tmp/buildd/ros-diamondback-ros-comm-1.4.8/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/node_handle.cpp:179
#9  0x00f0caa5 in ~NodeHandle (this=0xac061d20, __in_chrg=<value optimized out>)
    at /tmp/buildd/ros-diamondback-ros-comm-1.4.8/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/node_handle.cpp:126
#10 0x015b542d in ~Display (this=0xac061d08, __in_chrg=<value optimized out>) at /home/brice/driving_repos/rdr_public/stacks/visualization/rviz/src/rviz/display.cpp:58
#11 0x06607229 in ~ImageryDisplay (this=0xac061d08, __in_chrg=<value optimized out>) at /home/brice/driving_repos/rdr_public/stacks/visualization/driving_rviz_plugins/src/imagery_display.cpp:88

My destructor cleans up my stuff and does:

scene_manager_->destroySceneNode(scene_node_);

Any suggestion on how to fix/debug this problem? I read the code for the builtin plugins that also use the EnumProperty, such as Pose and Grid, but did not find anything in particular.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-01-02 12:57:59