[cairo-bugs] [Bug 4299] Assertion fails in "cairo-font.c" when using multithreads

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 13 15:19:18 PDT 2005

Please do not reply to this email: if you want to comment on the bug, go to    
the URL shown below and enter yourcomments there.     

------- Additional Comments From cworth at cworth.org  2005-09-13 15:19 -------
I've now committed these two patches to the HEAD of CVS (ChangeLog below),
so the fix is in place for 1.2.0 now.

As for 1.0.0, the patches don't apply directly. The first needs to modify
cairo-font.c rather than cairo-scaled-font.c. (I've committed this in the
BRANCH_1_0 branch so that fix is in place for 1.0.2). The second patch is not
relevant to 1.0.0 at all, (the bug is in new code added since then).

I've added the test case to "make check" as test/pthread-text.c on both branches.

There's still one remaining, similar bug that exists in BRANCH_1_0. There
the test case triggers the following:

    lt-pthread-show-text: cairo-ft-font.c:677:
    _cairo_ft_unscaled_font_set_scale: Assertion `error == 0' failed.

I'm looking into that now.


2005-09-13  Carl Worth  <cworth at cworth.org>

        * src/cairo-scaled-font.c: (_cairo_scaled_glyph_lookup): Add
        missing locking around the call into the thread-shared cache here.

2005-09-13  Carl Worth  <cworth at cworth.org>

        * test/pthread-show-text.c: (start), (main): Adjust parameters to
        stress things a bit more, (better exposing another locking bug).

2005-09-13  Carl Worth  <cworth at cworth.org>

        * src/cairo-scaled-font.c: (cairo_scaled_font_reference),
        (cairo_scaled_font_destroy): Expand locking to encapsulate any
        modification to the reference count of a scaled font, rather than
        just modifcations of the scaled_font_map, since scaled fonts are
        shared between threads.

2005-09-13  Carl Worth  <cworth at cworth.org>

        * test/cairo-test.h: Add documentation for cairo_test functions.

        * test/cairo-test.c: (cairo_test_init), (cairo_test_expecting):
        Abstract log fie creation into cairo_test_init for use by tests
        that don't use cairo_test().

        * test/.cvsignore:
        * test/Makefile.am:
        * test/pthread-show-text.c: (start), (main): Add new test for bug
        #4299 as reported by Alexey Shabalin.
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the cairo-bugs mailing list