|Summary:||cairo_surface_create_similar_image seems to always fail for the win32 display backend|
|Product:||cairo||Reporter:||Michael Henning <drawoc>|
|Component:||win32 backend||Assignee:||cairo-bugs mailing list <cairo-bugs>|
|Status:||RESOLVED FIXED||QA Contact:||cairo-bugs mailing list <cairo-bugs>|
|i915 platform:||i915 features:|
Description Michael Henning 2013-02-08 22:09:05 UTC
The assertion "assert (image->is_clear);" on line 591 of cairo-surface.c seems to always fail when it uses the implementation in cairo-win32-display-surface.c This assertion failure is currently preventing unstable versions of the gimp from functioning on windows. Removing the assertion allows the gimp to run fine.
Comment 1 Chris Wilson 2013-02-08 22:21:33 UTC
commit d4651676e1496f0354acb0ef045e8b65601edf6d Author: Chris Wilson <email@example.com> Date: Fri Feb 8 22:17:13 2013 +0000 win32: Clear the similar-image before returning to the user Our userspace API mandates that surfaces created for the user are cleared before they are returned. Make it so for the win32 similar image constructor. Reported-by: Michael Henning <firstname.lastname@example.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60519 Signed-off-by: Chris Wilson <email@example.com> I didn't even compile check that, so please can you double check that I haven't goofed? Thanks.
Comment 2 Partha Bagchi 2013-02-08 22:42:58 UTC
I don't know what you mean by "compile check"? Can you explain? What do I need to do to "compile check"? This bug, based on your patch, is preventing a Windows Gimp 2.9 build. I read on Gthumb site (https://mail.gnome.org/archives/commits-list/2012-August/msg06083.html) advocating that cairo_surface_create_similar_image() not be used. If I follow that advice and modify gimpdisplayxfer.c thusly: // cairo_surface_create_similar_image (cairo_get_target (cr), // CAIRO_FORMAT_ARGB32, w, h); cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h); it seems to compile and work fine on Windows. Is this a viable solution or should I try something else? Thanks, Partha
Comment 3 Michael Henning 2013-02-08 22:48:47 UTC
Partha, Chris thinks he just fixed the issue in cairo's git repository. He didn't test it, so now I'm compiling everything to see if it's fixed. There's really nothing wrong with the gimp's code - it's a bug in cairo.
Comment 4 Michael Henning 2013-02-08 22:58:04 UTC
Chris: Yes, that fixed it. Thanks for the quick response. :)