Bug 99054

Summary: cairo snapshot 1.15.[2,4], win32 backend: assertion (surface->is_clear) failed
Product: cairo Reporter: Gerhard Bräunlich <wippbox>
Component: win32 backendAssignee: cairo-bugs mailing list <cairo-bugs>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: critical    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix

Description Gerhard Bräunlich 2016-12-11 12:06:31 UTC
Created attachment 128411 [details] [review]
Fix

I cross-compiled cairo-1.15.2 and cairo-1.15.4 for windows.
When running a test program, I get the following:

>   Assertion failed!
> 
>   File: src/cairo-surface.c, Line 545
> 
>   Expression: surface->is_clear
> 
>   abnormal program termination

This happens in cairo_surface_create_similar.
Adding a line
> new_surf->is_clear = TRUE;
at the end of _cairo_win32_display_surface_create_similar in src/win32/cairo-win32-display-surface.c
fixes the issue (see patch).

Remark: The particular case occured only for width = 0 in cairo_surface_create_similar. For width > 0 the issue did not happen.
Comment 1 Simon 2017-01-13 08:42:25 UTC
I have a similar bug in ruby rcairo.

Full story is available on the rcairo issue :
https://github.com/rcairo/rcairo/issues/41
Comment 2 GitLab Migration User 2018-08-25 13:56:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/283.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.