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

rviz segfault after exception electric 1.6.3 (ros-pkg ticket #5182) #444

Closed
hershwg opened this issue Sep 19, 2012 · 1 comment
Closed
Labels

Comments

@hershwg
Copy link
Member

hershwg commented Sep 19, 2012

I believe the root cause of the exception stems from may computer coming up in low-graphics mode after a reboot. I'm running electric on Lucid.

{{{
Xlib: extension "GLX" missing on display ":1.0".
[ INFO] [1316810203.358114752]: Loading general config from [/u/dking/.rviz/config]
[ INFO] [1316810203.358222178]: Loading display config from [/u/dking/.rviz/display_config]
[ INFO] [1316810203.385047844]: RTT Preferred Mode is PBuffer.
Xlib: extension "GLX" missing on display ":1.0".
Xlib: extension "GLX" missing on display ":1.0".
[ERROR] [1316810203.385907195]: Caught exception while loading: OGRE EXCEPTION(3:RenderingAPIException): Unexpected failure to determine a GLXFBConfig in GLXWindow::create at /tmp/buildd/ros-electric-visualization-common-1.6.2/debian/ros-electric-visualization-common/opt/ros/electric/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/GLX/OgreGLXWindow.cpp (line 302)
}}}

{{{
Program received signal SIGSEGV, Segmentation fault.
0x00007fffeed6a3c2 in wxEvtHandler::Disconnect(int, int, int, void (wxObject::)(wxEvent&), wxObject, wxEvtHandler*) () from /usr/lib/libwx_baseu-2.8.so.0
(gdb) bt
#0 0x00007fffeed6a3c2 in wxEvtHandler::Disconnect(int, int, int, void (wxObject::)(wxEvent&), wxObject, wxEvtHandler*) () from /usr/lib/libwx_baseu-2.8.so.0
#1 0x00007ffff0b164b3 in wxEvtHandler::Disconnect (this=0x809190, __in_chrg=) at /usr/include/wx-2.8/wx/event.h:2449
#2 wxEvtHandler::Disconnect (this=0x809190, __in_chrg=) at /usr/include/wx-2.8/wx/event.h:2455
#3 ~VisualizationFrame (this=0x809190, __in_chrg=)

at /tmp/buildd/ros-electric-visualization-1.6.3/debian/ros-electric-visualization/opt/ros/electric/stacks/visualization/rviz/src/rviz/visualization_frame.cpp:105

#4 0x00007fffef67bc63 in wxAppBase::CleanUp() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#5 0x00007fffeed1006f in wxEntryCleanup() () from /usr/lib/libwx_baseu-2.8.so.0
#6 0x00007fffeed10430 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#7 0x0000000000413d42 in main (argc=1, argv=0xffffffff)

at /tmp/buildd/ros-electric-visualization-1.6.3/debian/ros-electric-visualization/opt/ros/electric/stacks/visualization/rviz/src/rviz/visualizer_app.cpp:340

}}}

It look like program was exiting already. Here's a patch that prevents segfault
{{{

Index: src/rviz/visualization_frame.cpp

--- src/rviz/visualization_frame.cpp (revision 37955)
+++ src/rviz/visualization_frame.cpp (working copy)
@@ -90,10 +90,18 @@

VisualizationFrame::VisualizationFrame(wxWindow* parent)
: wxFrame(parent, wxID_ANY, wxT("RViz"), wxDefaultPosition, wxSize(1024, 768), wxDEFAULT_FRAME_STYLE)
+, render_panel_(NULL)
+, displays_panel_(NULL)
+, views_panel_(NULL)
+, time_panel_(NULL)
+, selection_panel_(NULL)
+, tool_properties_panel_(NULL)
, menubar_(NULL)
, file_menu_(NULL)
, recent_configs_menu_(NULL)
+, toolbar_(NULL)
, aui_manager_(NULL)
+, manager_(NULL)
{
wxInitAllImageHandlers();
}
@@ -102,17 +110,32 @@
{
Disconnect(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(VisualizationFrame::onPaneClosed), NULL, this);
#if !defined(WXMAC)

  • toolbar_->Disconnect( wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( VisualizationFrame::onToolClicked ), NULL, this );
  • if (toolbar_)
  • {
  • toolbar_->Disconnect( wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( VisualizationFrame::onToolClicked ), NULL, this );
  • }

endif

  • saveConfigs();
  • if (general_config_ && aui_manager_)
  • {
  • saveConfigs();
  • }
  • manager_->removeAllDisplays();
  • if (manager_)
  • {
  • manager_->removeAllDisplays();
  • }
  • aui_manager_->UnInit();
  • delete aui_manager_;
  • if (aui_manager_)
  • {
  • aui_manager_->UnInit();
  • delete aui_manager_;
  • }
  • render_panel_->Destroy();
  • if (render_panel_)
  • {
  • render_panel_->Destroy();
  • }
    delete manager_;
    }
    }}}

trac data:

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[hersh] Hey thanks, that's great.

Committed in r37961.

@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