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 when removing camera display (ros-pkg ticket #4638) #374

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

rviz: Segfault when removing camera display (ros-pkg ticket #4638) #374

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

Comments

@hershwg
Copy link
Member

hershwg commented Sep 19, 2012

RViz reliably segfaults when removing a camera display. Steps to reproduce:

  1. Launch up and view the rgb/image_color topic from a Kinect (followed steps here: http://www.ros.org/wiki/ni) (prolly works with any camera though)
  2. Close the camera display window
  3. Remove the camera display from the display list (but do not uncheck it first)
  4. RViz segfaults.

My guess would be that RViz tries to close the Camera window when I remove the display, but the camera window is already gone. Hence the segfault.

Backtrace (patched version including ticket 4610, but otherwise should be most recent trunk):

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff1cc556a in wxAuiManager::DoFrameLayout() () from /usr/lib/libwx_gtk2u_aui-2.8.so.0
#2 0x00007ffff1cc75a0 in wxAuiManager::OnSize(wxSizeEvent&) () from /usr/lib/libwx_gtk2u_aui-2.8.so.0
#3 0x00007ffff0589ff0 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0
#4 0x00007ffff058afc4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-2.8.so.0
#5 0x00007ffff058b0a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0
#6 0x00007ffff0e6e081 in wxFrame::GtkOnSize() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#7 0x00007ffff0e1efea in wxTopLevelWindowGTK::OnInternalIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#8 0x00007ffff0e6dc59 in wxFrame::OnInternalIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9 0x00007ffff0e9a21d in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0x00007ffff0e9a254 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#11 0x00007ffff0e9a4b4 in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#12 0x00007ffff0dfe593 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#13 0x00007fffeca928c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#14 0x00007fffeca96748 in ?? () from /lib/libglib-2.0.so.0
#15 0x00007fffeca96c55 in g_main_loop_run () from /lib/libglib-2.0.so.0
#16 0x00007fffeee22bb7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x00007ffff0e15558 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0x00007ffff0e9a2eb in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#19 0x00007ffff053047c in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x0000000000413b72 in main (argc=1, argv=0x1) at /home/eric/code/dev_stacks/visualization/rviz/src/rviz/visualizer_app.cpp:321

trac data:

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[ericperko] A better formatted backtrace (my bad on the one above):

{{{
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff1cc556a in wxAuiManager::DoFrameLayout() () from /usr/lib/libwx_gtk2u_aui-2.8.so.0
#2 0x00007ffff1cc75a0 in wxAuiManager::OnSize(wxSizeEvent&) () from /usr/lib/libwx_gtk2u_aui-2.8.so.0
#3 0x00007ffff0589ff0 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler_, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0
#4 0x00007ffff058afc4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler_) () from /usr/lib/libwx_baseu-2.8.so.0
#5 0x00007ffff058b0a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0
#6 0x00007ffff0e6e081 in wxFrame::GtkOnSize() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#7 0x00007ffff0e1efea in wxTopLevelWindowGTK::OnInternalIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#8 0x00007ffff0e6dc59 in wxFrame::OnInternalIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9 0x00007ffff0e9a21d in wxAppBase::SendIdleEvents(wxWindow_, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0x00007ffff0e9a254 in wxAppBase::SendIdleEvents(wxWindow_, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#11 0x00007ffff0e9a4b4 in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#12 0x00007ffff0dfe593 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#13 0x00007fffeca928c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#14 0x00007fffeca96748 in ?? () from /lib/libglib-2.0.so.0
#15 0x00007fffeca96c55 in g_main_loop_run () from /lib/libglib-2.0.so.0
#16 0x00007fffeee22bb7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x00007ffff0e15558 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0x00007ffff0e9a2eb in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#19 0x00007ffff053047c in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x0000000000413b72 in main (argc=1, argv=0x1) at /home/eric/code/dev_stacks/visualization/rviz/src/rviz/visualizer_app.cpp:321
}}}

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[hersh] How do you close a camera display? For me, the window border does not have a close button.

Is this still a bug for you with the latest version of rviz?

I can probably add a handler for a wxCloseEvent if this is still an issue for you.

What window manager are you using? What OS?

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[ericperko] I still see this bug on the latest version of Diamondback rviz.

I'm running xmonad on Ubuntu 10.10 64-bit. XMonad allows me to close windows by "alt-shift-c" when the window has focus - this is the normal way to close a window in XMonad, so there's no indication that it shouldn't be closed (e.g. by the border not having a close button). You might be able to get the same behavior in normal Gnome if you can close by right clicking or alt-f4 or something.

Do you think there is anything in trunk that might have fixed this? If so, I can checkout and try it sometime this week with trunk.

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[hersh] OK that is a new window manager for me to try. Rviz code does not show close buttons but it also does not listen for window-close events. I will add that.

There are not yet any changes in trunk that would fix this.

Thanks for reporting.

@hershwg
Copy link
Member Author

hershwg commented Sep 19, 2012

[hersh] Well there you have it. xmonad is quite an experience.

Bug is fixed in trunk, r37680. Now when you close a Camera or Image display via Alt/Shift/C in xmonad, the display is properly disabled and the checkbox in the displays panel gets un-checked. When the display is subsequently removed from the list, rviz continues running.

@hershwg hershwg closed this as completed Sep 19, 2012
emersonknapp pushed a commit to emersonknapp/rviz that referenced this issue Mar 1, 2019
If defined, propagate the CMAKE_TOOLCHAIN_FILE argument to the cmake
argument of freetype, zlib and ogre projects.

Change-Id: Ibf2802b96c2238a06191e78a1b2a3128769a83af
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
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