Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gtkada.File_Selection raises error: unhandled signal #22

Open
Lyaaaaaaaaaaaaaaa opened this issue Jul 9, 2019 · 1 comment
Open

Gtkada.File_Selection raises error: unhandled signal #22

Lyaaaaaaaaaaaaaaa opened this issue Jul 9, 2019 · 1 comment

Comments

@Lyaaaaaaaaaaaaaaa
Copy link

Good day,
I'm trying to use Gtkada.File_Selection and its function File_Selection_Dialog for an application reading files. The package's description says

"This package provides a high level support for creating file selection dialogs by handling the signals internally"

However, when using it my program raises PROGRAM_ERROR : unhandled signal
I tried to directly use Gtk.File_Chooser and Gtk.File_Chooser_dialog but it leads to the same error.

Here is the procedure called for selecting a file and leading to the error:
Retour is an unbounded string

procedure Button_Select_File_Clicked (Self : access Gtk_Button_Record'Class) is
begin

  Retour := To_Unbounded_String
    (File_Selection_Dialog (Title       => "Select your file",
                            Default_Dir => "",
                            Dir_Only    => False,
                            Must_Exist  => True) );

end Button_Select_File_Clicked;


Here is the full error message:
Gtk-Message: 10:32:33.938: Failed to load module "pk-gtk-module"
Gtk-Message: 10:32:33.938: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:32:33.939: Failed to load module "pk-gtk-module"
Gtk-Message: 10:32:33.940: Failed to load module "canberra-gtk-module"
Fontconfig warning: "/home/bob/Applications/Gnat_IDE/Gnat-community/etc/fonts/fonts.conf", line 86: unknown element "blank"

(log_filter_main:10478): Gtk-WARNING **: 10:32:36.273: Error loading theme icon 'image-missing' for stock: Failed to load /home/bob/Applications/Gnat_IDE/Gnat-community/share/icons/Adwaita/16x16/status/image-missing.png: Format d?image non reconnu

(log_filter_main:10478): Gdk-CRITICAL **: 10:32:36.273: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(log_filter_main:10478): GLib-GObject-CRITICAL **: 10:32:36.273: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /home/bob/Applications/Gnat_IDE/Gnat-community/share/icons/Adwaita/16x16/status/image-missing.png: Format d?image non reconnu (gdk-pixbuf-error-quark, 3)
raised PROGRAM_ERROR : unhandled signal

I'm not sure if the problems come from Gtk or GtkAda.
Thank you for your time.

PS: I attached some files in case you need it.

log_filter.zip

@Lyaaaaaaaaaaaaaaa
Copy link
Author

I tested it on GPS 2019 and 2018 with GtkAda 2018 and 2019, it leads to the same problem.
However, the program works well out of GPS environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant