please someone has an idea on how i can to solve this problem??? here is my code.
main.adb
pragma Ada_2022;
with Gtk.Window; use Gtk.Window;
with Gtk.Main; use Gtk.Main;
with Gdk.Pixbuf; use Gdk.Pixbuf;
with Glib.Error; use Glib.Error;procedure main is
Win : Gtk_Window; – the window
Pix, Pix2 : Gdk_Pixbuf; – declaration of two gdk-pixbuf (Pix and Pix2).
Erreur : Glib.Error.GError;begin
Gtk.Main.Init;Gtk_New (Win); – initialize the window
Win.Fullscreen;Gdk_New_From_File (Pix, “Image.jpg”, Erreur);
Pix2 := Scale_Simple (Pix, 0, 0); – line 22.
– ^ error is raised here.Gtk.Window.Set_Icon (Win, Pix2);
Win.Show_All;
Gtk.Main.Main;
end main;
when i run my code, it raise an exception :
raised CONSTRAINT_ERROR : glib-object.adb:138 access check failed
[/home/dimitrilesdos/project/software/main/bin/main]
0x578d21 glib__object__get_object.part.0 at ???
0x579b41 gdk__pixbuf__scale_simple at ???
0x5691ff main at main.adb:22
0x56a682 Main at b__main.adb:1093
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fc4ca060248
0x7fc4ca060303
[/home/dimitrilesdos/project/software/main/bin/main]
0x5690bf _start at ???
0xfffffffffffffffe
however my image file "image.jpg exists and is in the same directory as my main.adb program