Post bugreports for the Linux version here
- Posts: 689
- Joined: Sun Apr 05, 2020 11:28 am
- Location: Pandora
Linux like the 32bit images not, crash, Win and Mac OK
Code: Select all
window_ID=OpenWindow(#PB_Any, 0, 0, 400, 400, "")
canvas_ID=CanvasGadget(#PB_Any, 0, 0, 400, 400)
image_ID=CreateImage(#PB_Any, 400, 400, 32, $FF)
SetGadgetAttribute(canvas_ID, #PB_Button_Image, ImageID(image_ID))
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
- Posts: 1831
- Joined: Thu Apr 21, 2005 2:38 pm
- Location: Germany
I can confirm the problem with Saki's example on my Linux Mint 19.3 'Tricia' x64 with Cinnamon while i can also confirm that the example is running like a charm on MacOS 11.2.1 'Big Sur' and Windows.
Technically the use of #PB_Button_Image in a SetGadgetAttribute() for a CanvasGadget is incorrect (instead of #PB_Button_Image a CanvasGadget supports #PB_Canvas_Image according to CanvasGadget's help). But in PureBasic for Linux, MacOS and Windows #PB_Button_Image and #PB_Canvas_Image are both defined as 1, so this can't explain the problem on Linux.
In Linux Mint 'Tricia' I don't get a crash but the following warning:
"[WARNING] GdkPixbuf (CRITICAL): gdk_pixbuf_copy_area: assertion '!(gdk_pixbuf_get_has_alpha (src_pixbuf) && !gdk_pixbuf_get_has_alpha (dest_pixbuf))' failed"