Bug 44859 - Invalid assertion statement in causes an application to fail
Summary: Invalid assertion statement in causes an application to fail
Status: RESOLVED DUPLICATE of bug 18862
Alias: None
Product: cairo
Classification: Unclassified
Component: freetype font backend (show other bugs)
Version: 1.8.6
Hardware: ARM Linux (All)
: medium normal
Assignee: David Turner
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 05:24 UTC by crusnik
Modified: 2012-01-17 20:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description crusnik 2012-01-17 05:24:54 UTC
In the _cairo_ft_unscaled_font_lock_face, the following assertion code is invalid:


    /* If this unscaled font was created from an FT_Face then we just
     * returned it above. */
    assert (!unscaled->from_face);

When  _font_map_release_face_lock_held (font_map, entry) is called further below in the function, it sets unscaled->face to NULL, but unscaled->from_face remains true.

So when a call to _cairo_ft_unscaled_font_lock_face is made again for the released scaled face, it leads to an assertion failure, because 

if (unscaled->face)
        return unscaled->face;

does not return (unscaled->face is now NULL), while unscaled->from_face is true. This leads to an assertion failure.
Comment 1 crusnik 2012-01-17 20:28:39 UTC
I just tested the use case on the latest version of Cairo, and I see that the error does not occur. 

It looks like this fixed it: https://bugs.freedesktop.org/show_bug.cgi?id=18862

*** This bug has been marked as a duplicate of bug 18862 ***


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.