GNOME Bugzilla – Bug 503326
gtk_combo related crash (windows)
Last modified: 2008-01-29 17:42:44 UTC
Steps to reproduce: 1. Compile/link testgtk.c (from gtk test suite) under Windows using MSVC6. 2. Start program; select "Display and Screen"; 3. Hit cancel: works OK 4. Select "Display and Screen" again; 5. Hit down-arrow on GtkCombo widget twice (to cause the pop-down to display; 6. Hit cancel on the "display and Screen" window: the program will crash. ---- or ---- compile/link/run simple test program as shown in "other information" below. Stack trace: (I don't have Windows debug vesions of GTk and don't know how to create same). LIBGDK-WIN32-2.0-0! 6b088390() LIBGDK-WIN32-2.0-0! 6b05c929() LIBGDK-WIN32-2.0-0! 6b05ca2a() LIBGTK-WIN32-2.0-0! 606c32e4() LIBGOBJECT-2.0-0! 62743995() LIBGOBJECT-2.0-0! 62756dc6() LIBGOBJECT-2.0-0! 62757f3e() LIBGOBJECT-2.0-0! 627581b6() LIBGTK-WIN32-2.0-0! 606bf78c() LIBGTK-WIN32-2.0-0! 606c64e0() LIBGOBJECT-2.0-0! 627495e0() screen_display_destroy_diag(_GtkWidget * 0x009800f0, _GtkWidget * 0x00936508) line 8670 + 9 bytes LIBGOBJECT-2.0-0! 62743995() LIBGOBJECT-2.0-0! 62757195() LIBGOBJECT-2.0-0! 62757f3e() LIBGOBJECT-2.0-0! 627581b6() LIBGTK-WIN32-2.0-0! 604a56e0() LIBGTK-WIN32-2.0-0! 604a793c() LIBGOBJECT-2.0-0! 62743995() LIBGOBJECT-2.0-0! 62756b92() LIBGOBJECT-2.0-0! 62757f3e() LIBGOBJECT-2.0-0! 627581b6() LIBGTK-WIN32-2.0-0! 604a5650() LIBGTK-WIN32-2.0-0! 604a6d52() LIBGTK-WIN32-2.0-0! 6058c212() LIBGOBJECT-2.0-0! 62743995() LIBGOBJECT-2.0-0! 62756dc6() LIBGOBJECT-2.0-0! 62757c9c() LIBGOBJECT-2.0-0! 627581b6() LIBGTK-WIN32-2.0-0! 606bde44() LIBGTK-WIN32-2.0-0! 605893c1() LIBGTK-WIN32-2.0-0! 6058a6e1() LIBGDK-WIN32-2.0-0! 6b07114e() LIBGLIB-2.0-0! 672de877() LIBGLIB-2.0-0! 672dfd5b() LIBGLIB-2.0-0! 672dff3a() LIBGTK-WIN32-2.0-0! 60589c2e() main(int 0x00000001, char * * 0x00344da0) line 1382 Other information: Environment: Windows gtk & etc from ftp.gnome.org (as linked from Tor Lillqvist's site) Windows MSVC6 Windows XP The problem was originally encountered when the development Windows Wireshark began to use the latest Windows Gtk/Glib Dll's & etc. (See http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2066 for details). The problem seems to have been introduced in GTK 2.12.2/Glib 2.14.4. (The problem still exists with gtk 2.12.3/glib 2.14.4). The problem does not occur with GTK 2.12.1/Glib 2.14.3 The problem does not seem to show up on Fedora 32-bits using GTK 2.12.2/Glib 2.14.4. The problem can also be demonstrated with a very simple gtk program: -------------- #include <gtk/gtk.h> static void destroy_quit( GtkWidget *w, gpointer d ) { gtk_main_quit(); } static void destroy_win( GtkWidget *w, gpointer d) { gtk_widget_destroy(w); } int main( int argc, char *argv[] ) { GtkWidget *w, *cw, *combo; GList *items = NULL; gtk_init (&argc, &argv); w = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(G_OBJECT (w), "destroy", G_CALLBACK (destroy_quit), NULL); gtk_widget_show_all(w); cw = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(G_OBJECT (cw), "destroy", G_CALLBACK (destroy_win) , NULL); combo = gtk_combo_new(); items = g_list_append(items, "First Item"); gtk_combo_set_popdown_strings(GTK_COMBO (combo), items); gtk_container_add(GTK_CONTAINER (cw), combo); gtk_widget_show_all(cw); gtk_main (); return 0; } ----------------------------- run program, invoke popdown and then delete (destroy) the window with the GtkCombo widget. The program will crash emitting the following message: (gtk_combo_test.exe:3764): GLib-GObject-WARNING **: invalid uninstantiatable typ e `<invalid>' in cast to `GdkWindow' The crash actually occurs *only* if the popdown has been displayed when calling gtk_widget_destroy on the window containing the GtkCombo widget .
Please raise the priority of this bug to HIGH as no workaround exists at this moment and therefor the GTK+ version used in Wireshark has been reverted back to GTK+ 2.12.1 with GLib 2.14.3 (for Windows installs). We would like to see this bug fixed so that we can use the latest GTK+2 version again. (please see: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2066 for more info on the impact on Wireshark)
This problem isn't reproducible in the freshly released GTK+ 2.12.6. Windows binaries at http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.12/ My guess is that the problem was caused by bug #506769 . *** This bug has been marked as a duplicate of 506769 ***
GTK+ 2.12.6 does indeed fix this problem. Thanks