It is currently Tue Apr 13, 2021 1:52 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SetGadgetAttribute-Canvas, Button_Image_32Bit_Crash 573 Mint
PostPosted: Fri Feb 12, 2021 3:25 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Apr 05, 2020 11:28 am
Posts: 626
Location: Pandora
Linux like the 32bit images not, crash, Win and Mac OK

Code:
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

_________________
地球上の平和


Top
 Profile  
Reply with quote  
 Post subject: Re: SetGadgetAttribute-Canvas, Button_Image_32Bit_Crash 573
PostPosted: Fri Feb 12, 2021 11:43 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1825
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"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye