Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planning_display segfaults rviz (ros-pkg ticket #960) #78

Closed
hershwg opened this issue Sep 19, 2012 · 9 comments
Closed

planning_display segfaults rviz (ros-pkg ticket #960) #78

hershwg opened this issue Sep 19, 2012 · 9 comments
Labels

Comments

@hershwg
Copy link
Member

hershwg commented Sep 19, 2012

I get the following gdb backtrace by roslaunching tabletop_manipulation/sim.launch, then running rviz, enabling Planning, with Visual enabled and Collision disabled. Seems pretty repeatable.

{{{
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb35ee730 (LWP 21778)]
0xb7e3cdf5 in planning_models::KinematicModel::computeTransforms (this=0x0,
params=0xa873b830, groupID=-1)
at /u/gerkey/code/personalrobots/world_models/robot_models/planning_models/src/kinematic.cpp:82
82 assert(m_built);
(gdb) bt
#0 0xb7e3cdf5 in planning_models::KinematicModel::computeTransforms (

this=0x0, params=0xa873b830, groupID=-1)
at /u/gerkey/code/personalrobots/world_models/robot_models/planning_models/src/kinematic.cpp:82

#1 0xb6b07e22 in rviz::PlanningDisplay::update (this=0xa863b298,

dt=0.0359999985)
at /u/gerkey/code/personalrobots/visualization/rviz/src/rviz/displays/planning_display.cpp:229

#2 0xb6a961c4 in rviz::VisualizationManager::onUpdate (this=0x87c4340,

event=@0xbf85c174)
at /u/gerkey/code/personalrobots/visualization/rviz/src/rviz/visualization_manager.cpp:246

#3 0xb619a0e1 in wxAppConsole::HandleEvent ()

from /usr/lib/libwx_baseu-2.8.so.0
#4 0xb6241b88 in wxEvtHandler::ProcessEventIfMatches ()

from /usr/lib/libwx_baseu-2.8.so.0
#5 0xb6241d74 in wxEvtHandler::SearchDynamicEventTable ()

from /usr/lib/libwx_baseu-2.8.so.0
#6 0xb6241e33 in wxEvtHandler::ProcessEvent ()

from /usr/lib/libwx_baseu-2.8.so.0
---Type to continue, or q to quit---
#7 0xb6552921 in wxTimerBase::Notify ()

from /usr/lib/libwx_gtk2u_core-2.8.so.0
#8 0xb642dec5 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9 0xb493a436 in ?? () from /usr/lib/libglib-2.0.so.0
#10 0x087c2398 in ?? ()
#11 0xb600ea0c in __pthread_mutex_unlock_usercnt ()

from /lib/tls/i686/cmov/libpthread.so.0
#12 0xb4939cc6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0xb493d083 in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x0808cf10 in ?? ()
#15 0x00000000 in ?? ()

}}}

trac data:

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[anonymous] It seems this=0x0 in planning models, so the call is made on an invalid instance. Are you sure bot rviz & planning_models are up to date and built ? The function signature used no longer exists.

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[isucan] I actually get a segfault from mechanism model:

{{{
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f8ba885f830 (LWP 24446)]
0x00007f8ba58d6787 in mechanism::findIndexByName (v=@0x2260260, name=@0x7fffb09bbf90)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:103
103 if (v[i]->name_ == name)
(gdb) p name
$1 = (const string &) @0x7fffb09bbf90: {static npos = 18446744073709551615,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0x2533a38 "fl_caster_rotation_motor"}}
(gdb) p v
$2 = (
std::vector<Actuator*, std::allocator<Actuator*> > &) @0x2260260: {<std::_Vector_base<Actuator*, std::allocator<Actuator*> >> = {
_M_impl = {std::allocator<Actuator*> = {<__gnu_cxx::new_allocator<Actuator*>> = {}, }, _M_start = 0x0, _M_finish = 0x2260210, _M_end_of_storage = 0x0}}, }
}}}

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[gerkey] I was up-to-date when I got the original crash. Now I get a similar but slightly different backtrace:
{{{
[Switching to Thread 0xb363a730 (LWP 28579)]
0xb7e89c3d in planning_models::KinematicModel::computeTransformsGroup (
this=0x0, params=0x8e95bf0, groupID=-1)
at /u/gerkey/code/personalrobots/world_models/robot_models/planning_models/src/kinematic.cpp:87
87 assert(m_built);
(gdb) bt
#0 0xb7e89c3d in planning_models::KinematicModel::computeTransformsGroup (
this=0x0, params=0x8e95bf0, groupID=-1)
at /u/gerkey/code/personalrobots/world_models/robot_models/planning_models/src/kinematic.cpp:87
#1 0xb7e89e36 in planning_models::KinematicModel::computeTransforms (
this=0x0, params=0x8e95bf0)
at /u/gerkey/code/personalrobots/world_models/robot_models/planning_models/src/kinematic.cpp:82
#2 0xb6b53e9a in rviz::PlanningDisplay::update (this=0x9289470,
dt=0.0320000015)
at /u/gerkey/code/personalrobots/visualization/rviz/src/rviz/displays/planning_display.cpp:229
#3 0xb6ae2234 in rviz::VisualizationManager::onUpdate (this=0x8771650,
event=@0xbfe2ff54)
at /u/gerkey/code/personalrobots/visualization/rviz/src/rviz/visualization_manager.cpp:246
#4 0xb61e60e1 in wxAppConsole::HandleEvent ()
from /usr/lib/libwx_baseu-2.8.so.0
#5 0xb628db88 in wxEvtHandler::ProcessEventIfMatches ()
from /usr/lib/libwx_baseu-2.8.so.0
#6 0xb628dd74 in wxEvtHandler::SearchDynamicEventTable ()
from /usr/lib/libwx_baseu-2.8.so.0
#7 0xb628de33 in wxEvtHandler::ProcessEvent ()
from /usr/lib/libwx_baseu-2.8.so.0
#8 0xb659e921 in wxTimerBase::Notify ()
from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9 0xb6479ec5 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0xb4986436 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x08770a08 in ?? ()
#12 0xb605aa0c in __pthread_mutex_unlock_usercnt ()
from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb4985cc6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb4989083 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x0808cf10 in ?? ()
#16 0x00000000 in ?? ()
}}}

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[sglaser] Ioan: Could you post the backtrace from the crash?

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[isucan] Here it is:

{{{
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f63a5614830 (LWP 7278)]
0x00007f63a268b787 in mechanism::findIndexByName (v=@0x7f6388061d10,
name=@0x7fffad772d50)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:103
103 if (v[i]->name_ == name)
}}}

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[isucan] The actual backtrace this time...

{{{
(gdb) bt
#0 0x00007f63a268b787 in mechanism::findIndexByName (
v=@0x7f6388061d10, name=@0x7fffad772d50)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:103
#1 0x00007f63a267fd96 in mechanism::Robot::getActuatorIndex (
this=0x7fffad773260, name=@0x7fffad772d50)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:113
#2 0x00007f63a2680f1b in mechanism::Robot::getActuator (this=0x7fffad773260,
name=@0x7fffad772d50)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:139
#3 0x00007f63a2673118 in mechanism::SimpleTransmission::initXml (
this=0x2ca60e0, elt=0x2babd90, robot=0x7fffad773260)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/simple_transmission.cpp:62
#4 0x00007f63a268121e in mechanism::Robot::initXml (this=0x7fffad773260,
root=0x2b9fac0)
at /home/isucan/repos/ros-pkg/mechanism/mechanism_model/src/robot.cpp:65
#5 0x00007f63a52b4e55 in rviz::PlanningDisplay::load (this=0x7f638805a440)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/displays/planning_display.cpp:167
#6 0x00007f63a52b52ed in rviz::PlanningDisplay::setRobotDescription (
this=0x7f638805a440, description_param=)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/displays/planning_display.cpp:91
---Type to continue, or q to quit---
#7 0x00007f63a5243f34 in rviz::StringProperty::loadFromConfig (
this=0x7f6388061a40, config=0x29b6640)
at /opt/ros/include/boost-1_37/boost/function/function_template.hpp:989
#8 0x00007f63a524c6df in rviz::PropertyManager::load (
this=, config=0x29b6640)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/properties/property_manager.cpp:199
#9 0x00007f63a525d1db in rviz::VisualizationManager::loadDisplayConfig (
this=0x29d1bb0, config=0x29b6640)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/visualization_manager.cpp:650
#10 0x00007f63a526f3f7 in rviz::VisualizationFrame::initialize (this=0x23579f0)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/visualization_frame.cpp:135
#11 0x00000000004069c8 in rviz::VisualizerApp::OnInit (this=0x22c2c50)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/visualizer_app.cpp:96
#12 0x00007f639eae1713 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#13 0x0000000000405dd2 in main (argc=1, argv=0x0)
at /home/isucan/repos/ros-pkg/visualization/rviz/src/rviz/visualizer_app.cpp:161
}}}

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[sglaser] I fixed the crash Ioan is having in r11408

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[isucan] it seems to work; closing bug

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[gerkey] As an addendum, I encountered another segfaul with planning_display. In the end, it was because I hadn't entered anything for the Robot Description property. I added a check for this case to prevent the crash. It's checked in on the tabletop_manipulation_feb-2009 branch, which I'll merge to trunk next week.

@hershwg hershwg closed this as completed Sep 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant