Ethereal-dev: Re: [Ethereal-dev] Gtk+ warning - assertion "GTK_IS_WIDGET (widget)" failed

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 6 Jan 2004 20:19:54 -0800
On Sat, Jan 03, 2004 at 05:20:53PM +0100, Olivier Biot wrote:
> When loading a capture in Ethereal, I get the following Gtk+ error message:
> 
> (ethereal:3808): Gtk-CRITICAL **:
> file ../../gtk+2.2.1/gtk/gtkwidget.c: line 1626 (gtk_widget_destroy):
> assertion "GTK_IS_WIDGET (widget)" failed
> 
> $ grep -n gtk_widget_destroy file_dlg.c

I suspect the problem isn't in that file.

I checked in a change to gtk/menu.c that removes the
"gtk_widget_destroy()" call in "remove_menu_recent_capture_file()", as
that's the one that was causing that error in my GTK+ 1.2.10 builds, at
least.  It appears that if you remove a menu item from the menu, the
menu item gets freed (the code path appears to cause that to happen) -
and freeing it might overwrite it, so that the checks done by GTK+ to
make sure it's a widget fail.