Bug 99054 - cairo snapshot 1.15.[2,4], win32 backend: assertion (surface->is_clear) failed
Summary: cairo snapshot 1.15.[2,4], win32 backend: assertion (surface->is_clear) failed
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
Keywords: patch
Depends on:
Reported: 2016-12-11 12:06 UTC by Gerhard Bräunlich
Modified: 2018-08-25 13:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Fix (347 bytes, patch)
2016-12-11 12:06 UTC, Gerhard Bräunlich
Details | Splinter Review

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

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