GNOME Bugzilla – Bug 665013
GdkPixmaps with depth 16 broken, breaks win32 remote desktop
Last modified: 2012-02-09 21:31:17 UTC
Cairo doesn't atm support 16bit GDI dibsections, so we don't support them. This is generally not a problem, but it seems to break windows remote desktop support. See comments on: http://blogs.gnome.org/alexl/2011/11/25/gtk-work-on-windows/#comments Allocating 24bit dibs for 16bit case fixes a crash, but doesn't render correctly. Not sure how to solve this without also fixing cairo. Maybe we can return an image based cairo surface instead?
Actually, that will probably break the gdk_draw_xyz calls. What we could do is create a dib section ourself and then have cairo draw to that memory as an image surface.
Hi, I help develop an application that uses Gtk+ on windows and we recently updated from version 2.24.7 to version to 2.24.8 and now the application crashes. I believe the problem is related to this bug although we do not use remote desktop. We do use a number of 16 pixmaps for various icons. I'll try to attach a backtrace in case it helps.
Created attachment 202735 [details] Backtrace of 16bit pixmap related crash
Tim: What exactly are you using the pixmaps for? Just painting somewhere?
Sorry, I didn't have much time to look at this before and I find windows tedious. I spent a bit more time looking at this before work this morning and I get the same crash with gtk-demo. So that led me to believe it wasn't something specific to our application. I am running windows(xp w/sp3) in a vm(qemu-kvm) so I tried something obvious like changing the screen display properties from 16 bit to 24 bit and the crash doesn't occur in either gtk-demo or our application and both run successfully.
Hmm, I tried 16bpp on win7 and it worked, dieter can you look at 16bpp on XP? I think we have to reintroduce some of the old code to create 16 bpp DIB sections and then create a image cairo surface for the dib memory (as cairo doesn't seem to do 16bpp win32 surfaces).
(In reply to comment #6) > Hmm, I tried 16bpp on win7 and it worked, dieter can you look at 16bpp on XP? On both winxp and win7 [1], setting adapter settings to 16 bit and launching for example gtk-demo.exe results in the same WARNING and bunch of CRITICALS as seen in attachment #202735 [details], followed by the friendly "gtk-demo.exe has encountered a problem and needs to close" dialog on winxp and it's cousin "gtk-demo.exe has stopped working" dialog on win7. Funny thing is that starting out with 32 bit settings, launching gtk-demo.exe and only then changing to 16 bit does not seem to produce the crash I was expecting to happen? This again on both winxp and win7. [1] had to hunt down this setting on win7 (well, only been using it for about a week now), so for those in the same situation: right click the desktop, click "Screen resolution", click "Advanced settings", click "List all modes", select some "16 bit" or "32 bit" mode, click "OK" and do not forget to click "Apply".
Fixed in: http://git.gnome.org/browse/gtk+/commit/?id=ba8c4bb049b36b3707c2c8f22c5c66b497e2d2cf
*** Bug 666401 has been marked as a duplicate of this bug. ***
*** Bug 669684 has been marked as a duplicate of this bug. ***