After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640487 - crash on gtk_statusbar_remove_all()
crash on gtk_statusbar_remove_all()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-01-24 22:49 UTC by g.trentalancia
Modified: 2011-01-31 23:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32


Attachments
stack backtrace for gtk_statusbar_remove_all() (63.19 KB, text/plain)
2011-01-24 22:49 UTC, g.trentalancia
Details

Description g.trentalancia 2011-01-24 22:49:33 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.
Comment 1 Matthias Clasen 2011-01-25 02:14:41 UTC
The stacktrace is not helpful, and the code in gtk_statusbar_remove_all looks alright to me. Can you provide a simple testcase, maybe ?
Comment 2 g.trentalancia 2011-01-25 13:22:15 UTC
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).
Comment 3 g.trentalancia 2011-01-25 13:29:28 UTC
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
  • #0 IA__gtk_statusbar_remove_all
    at gtkstatusbar.c line 521
  • #1 menu_item_selected

Comment 4 g.trentalancia 2011-01-28 16:43:28 UTC
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
    }
  }
}
Comment 5 Javier Jardón (IRC: jjardon) 2011-01-31 09:52:28 UTC
Moving not fixed 2.23 bugs to 2.24 stable release
Comment 6 g.trentalancia 2011-01-31 21:25:12 UTC
Why RESOLVED/FIXED ???

I have just tested against gtk+-2.24.0/glib-2.27.93 and the issue is still showing up...
Comment 7 André Klapper 2011-01-31 21:31:06 UTC
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.
Comment 8 g.trentalancia 2011-01-31 23:24:26 UTC
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.