GNOME Bugzilla – Bug 647309
Gtk2::FileChooserDialog shows nothing under FreeBSD
Last modified: 2011-04-10 04:05:57 UTC
cat a.pl use Gtk2; $a = Gtk2::FileChooserDialog->new("title!", undef, "open"); run the script hangs. GLib-GObject-WARNING **: invalid (NULL) pointer instance at a.pl line 2. GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANC E (instance)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (sc reen)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (scre en)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTIN GS (settings)' failed at a.pl line 2. Gtk-WARNING **: Invalid icon size 1 Gtk-CRITICAL **: IA__gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (ico n_theme)' failed at a.pl line 2. Gtk-WARNING **: Error loading theme icon 'edit-find' for stock: at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTIN GS (settings)' failed at a.pl line 2. Gtk-WARNING **: gtkstyle.c:2356: invalid icon size '1' at a.pl line 2. Gtk-CRITICAL **: IA__gtk_style_render_icon: assertion `pixbuf != NULL' failed at a.pl line 2. GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (sc reen)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (ico n_theme)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (sc reen)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (scre en)' failed at a.pl line 2. Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTIN GS (settings)' failed at a.pl line 2. Gtk-WARNING **: Invalid icon size 1 Gtk-CRITICAL **: IA__gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (ico n_theme)' failed at a.pl line 2. Gtk-WARNING **: Error loading theme icon 'document-x-generic' for stock: at a.p l line 2. Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTIN GS (settings)' failed at a.pl line 2. Gtk-WARNING **: gtkstyle.c:2356: invalid icon size '1' at a.pl line 2. Gtk-CRITICAL **: IA__gtk_style_render_icon: assertion `pixbuf != NULL' failed at a.pl line 2. GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed at a.pl line 2. This problem exists in version 1.221, 1.222, 1.223. Other versions are not tested.
You need to initialize gtk+: "use Gtk2 -init" instead of "use Gtk2", or call Gtk2->init manually.
(In reply to comment #1) > You need to initialize gtk+: "use Gtk2 -init" instead of "use Gtk2", or call > Gtk2->init manually. After I called Gtk2->init manually, the warnings are not there, but the dialog is still missing. The ->new just HANG! And the subsequent ->run call does not execute. Do not argue my programming skills or something... I found this problem in a software uses this lib.
To diagnose the hang, we'll need help. If i recall correctly, none of the gtk2-perl developers have access to a freebsd system for testing. Please run with strace or gdb to find out what's going on when the call hangs. Also, does the file_chooser.pl example hang the same way? http://git.gnome.org/browse/perl-Gtk2/tree/examples/file_chooser.pl
(In reply to comment #3) > To diagnose the hang, we'll need help. If i recall correctly, none of the > gtk2-perl developers have access to a freebsd system for testing. > > Please run with strace or gdb to find out what's going on when the call hangs. > > Also, does the file_chooser.pl example hang the same way? > http://git.gnome.org/browse/perl-Gtk2/tree/examples/file_chooser.pl Yes. The example hangs, when call ->new function. BTW. Is perl itself required to be built with pthread support to use this lib?
(In reply to comment #4) > (In reply to comment #3) > > To diagnose the hang, we'll need help. If i recall correctly, none of the > > gtk2-perl developers have access to a freebsd system for testing. > > > > Please run with strace or gdb to find out what's going on when the call hangs. > > > > Also, does the file_chooser.pl example hang the same way? > > http://git.gnome.org/browse/perl-Gtk2/tree/examples/file_chooser.pl > > Yes. The example hangs, when call ->new function. > BTW. Is perl itself required to be built with pthread support to use this lib? OK. Here is the problem. Perl is required to be built with pthread support to use the FileChooserDialog. But on FreeBSD, this is disabled by default. But why perl-Gtk2 can built without pthread?