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 647309 - Gtk2::FileChooserDialog shows nothing under FreeBSD
Gtk2::FileChooserDialog shows nothing under FreeBSD
Status: RESOLVED NOTABUG
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2011-04-09 19:45 UTC by Zhihao Yuan
Modified: 2011-04-10 04:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zhihao Yuan 2011-04-09 19:45:00 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.
Comment 1 Torsten Schoenfeld 2011-04-09 19:50:35 UTC
You need to initialize gtk+: "use Gtk2 -init" instead of "use Gtk2", or call Gtk2->init manually.
Comment 2 Zhihao Yuan 2011-04-09 23:23:34 UTC
(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.
Comment 3 muppet 2011-04-10 03:12:54 UTC
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
Comment 4 Zhihao Yuan 2011-04-10 03:37:12 UTC
(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?
Comment 5 Zhihao Yuan 2011-04-10 04:05:57 UTC
(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?