After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665013 - GdkPixmaps with depth 16 broken, breaks win32 remote desktop
GdkPixmaps with depth 16 broken, breaks win32 remote desktop
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
: 666401 669684 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-28 09:16 UTC by Alexander Larsson
Modified: 2012-02-09 21:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of 16bit pixmap related crash (10.25 KB, text/plain)
2011-12-04 01:47 UTC, Tim Mayberry
Details

Description Alexander Larsson 2011-11-28 09:16:02 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?
Comment 1 Alexander Larsson 2011-11-28 09:24:43 UTC
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.
Comment 2 Tim Mayberry 2011-12-04 01:46:45 UTC
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.
Comment 3 Tim Mayberry 2011-12-04 01:47:55 UTC
Created attachment 202735 [details]
Backtrace of 16bit pixmap related crash
Comment 4 Alexander Larsson 2011-12-05 13:08:36 UTC
Tim: What exactly are you using the pixmaps for? Just painting somewhere?
Comment 5 Tim Mayberry 2011-12-05 20:41:50 UTC
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.
Comment 6 Alexander Larsson 2011-12-06 08:14:42 UTC
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).
Comment 7 Dieter Verfaillie 2011-12-06 09:39:03 UTC
(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".
Comment 8 Dieter Verfaillie 2011-12-06 09:43:00 UTC
(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".
Comment 10 Emmanuele Bassi (:ebassi) 2011-12-17 09:12:12 UTC
*** Bug 666401 has been marked as a duplicate of this bug. ***
Comment 11 Dieter Verfaillie 2012-02-09 21:31:17 UTC
*** Bug 669684 has been marked as a duplicate of this bug. ***