Re: runtime error only on linux



yoann toussaint wrote:

sorry for submit code in gtkada, I don't if it would be appreciated, but I think I have found a bug which occurs only on linux (on windows it works for strange reason), so I made a simple example (bug_example in attachment) to show why I think this is bug in implementation of gtk library (or gtkada) on linux and not in my application.
this example compile successfully, but at run time the error occurs :

Gdk-ERROR **: BadMatch (invalid parameter attributes)
serial 274 error_code 8 request_code 73 minor_code 0

the code line which when I get the gdk_image from the drawing_area :

file window_pkg.adb, line 27 : Gdk.Image.Get(main_window.image,Win,0,0,Width,height);


I have found the bug !!!

   Win: gdk_Window;
     Width,Height: Gint;
  begin
   Win:=Get_window (Main_W.Ibuf.area);
     Get_Size (Win, Width, Height);
Gdk_New(Main_W.Ibuf.image, Image_normal, get_visual(Main_W.Ibuf.area),Width, Height);

when you specify the type of gdk_image "image_shared" instead of "image_normal", no runtime error occurs on linux !
yoann





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]