GNOME Bugzilla – Bug 410133
gnome-panel crashed with SIGSEGV in wnck_window_get_actions()
Last modified: 2007-04-29 13:57:24 UTC
That bug has been opened on https://launchpad.net/bugs/86542 "Binary package hint: gnome-panel I right clicked on a group of epiphany windows and choose 'close all' ... libwnck18 2.17.91-0ubuntu1 ..." Debug backtrace for the crash: (gdb) bt full
+ Trace 112390
From gdb and the crash file: (gdb) p *window $2 = {parent_instance = {g_type_instance = {g_class = 0x2c}, ref_count = 140769800, qdata = 0x8855bb0}, priv = 0x40}
Looks like a critical warning crasher, given the line numbers. Thus I suspect this doesn't really affect 2.18.x (unless someone is using a development version of libgnome or whatever handles the critical warning stuff). Anyway, does this patch seem to help? : Index: libwnck/window-action-menu.c =================================================================== --- libwnck/window-action-menu.c (revision 1201) +++ libwnck/window-action-menu.c (working copy) @@ -251,7 +251,13 @@ WnckScreen *screen; amd->idle_handler = 0; - + + /* The window may have been freed before the idle handler fires; if so, quit + * early. + */ + if (!WNCK_IS_WINDOW (amd->window)) + return FALSE; + actions = wnck_window_get_actions (amd->window); screen = wnck_window_get_screen (amd->window);
The Ubuntu versions don't use critical warning crashers to not annoy users too much, the corresponding line is " g_return_val_if_fail (WNCK_IS_WINDOW (window), 0);" in wnck_window_get_actions (), the window->priv=0x40 value doesn't look correct though, might be a corruption somewhere. I'll ask the submitter if he can trigger the bug whenever he wants, the crash doesn't happen here so it's not easy to try the change and know if it makes a difference
The only reason this could happen is the window being freed. What we should do in this case is destroy the menu. 2007-04-29 Vincent Untz <vuntz@gnome.org> * libwnck/window-action-menu.c: (window_weak_notify): destroy the menu when the window is getting finalized (set_data): kill (get_data): walk up in the parent tree to get the widget which knows about "wnck-action-data" (item_activated_callback): updated (make_radio_menu_item): don't call set_data since it's now useless (make_check_menu_item): ditto (make_menu_item): ditto Should fix bug #410133