GNOME Bugzilla – Bug 640487
crash on gtk_statusbar_remove_all()
Last modified: 2011-01-31 23:24:26 UTC
Created attachment 179245 [details] stack backtrace for gtk_statusbar_remove_all() Hello, sometimes I am having a crash from a call to gtk_statusbar_remove_all() from Ekiga 3.3.0. It happens randomly after selecting a menu such as Edit. The Ekiga guys said they can't see anything wrong with their code. Attached please find the stack backtrace.
The stacktrace is not helpful, and the code in gtk_statusbar_remove_all looks alright to me. Can you provide a simple testcase, maybe ?
It showed up occasionally on gtk+ version 2.32.2 with glib version 2.27.5. I am now testing version 2.23.90 with glib version 2.27.92 and will report back within a few hours. The Ekiga guys suggested to report here because they thought their code was all right. Why do you say the stack backtrace is not useful ? What do you mean for a "simple testcase" ? As already explained, it is sometimes possible to reproduce by simply selecting menus such as Edit (I usually try to select them multiple times until it occurs, trying to use the gui as much as possible).
Apparently it's still showing up with gtk+ 2.32.90 and glib 2.27.92: Program received signal SIGSEGV, Segmentation fault. IA__gtk_statusbar_remove_all (statusbar=0x8656968, context_id=1) at gtkstatusbar.c:521 521 list = prev->next; (gdb) where
+ Trace 225697
This is the code of the calling function for your reference (ekiga 3.3.0): /* DESCRIPTION : This callback is called when a menu item is selected or * deselected. * BEHAVIOR : Displays the data in the statusbar. * PRE : If data is NULL, clears the statusbar, else displays data * as message in the statusbar. */ static void menu_item_selected (GtkWidget *w, gpointer data) { GtkWidget *statusbar = NULL; guint id = 0; int len = 0; int i = 0; statusbar = (GtkWidget *) g_object_get_data (G_OBJECT (w), "statusbar"); if (!statusbar) return; else { id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "statusbar"); if (data) { gtk_statusbar_push (GTK_STATUSBAR (statusbar), id, (gchar *) data); } else { #if GTK_CHECK_VERSION (2, 21, 2) gtk_statusbar_remove_all (GTK_STATUSBAR (statusbar), id); #else len = g_slist_length ((GSList *) (GTK_STATUSBAR (statusbar)->messages)); for (i = 0 ; i < len ; i++) gtk_statusbar_pop (GTK_STATUSBAR (statusbar), id); #endif } } }
Moving not fixed 2.23 bugs to 2.24 stable release
Why RESOLVED/FIXED ??? I have just tested against gtk+-2.24.0/glib-2.27.93 and the issue is still showing up...
Fixed after 2.24.0 tarball creation: http://git.gnome.org/browse/gtk+/commit/?id=30958ea8ad1a60449eb6ad47eb679a2de70d96ed&h=gtk-2-24 Hence FIXED. Please do not fiddle knobs. Restoring previous status.
I do apologise, but it wasn't mentioned "fixed where" and the latest release didn't bring the fix yet. Yes, it appears to be working fine now. Thanks for your time Matthias ! I will report back to the Ekiga mailing list.