[cairo-bugs] [Bug 38049] New: Hash table contains zero referenced font faces!

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 7 12:58:37 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=38049

           Summary: Hash table contains zero referenced font faces!
           Product: cairo
           Version: 1.10.3
          Platform: All
        OS/Version: Windows (All)
            Status: NEW
          Severity: critical
          Priority: medium
         Component: win32 backend
        AssignedTo: cairo-bugs at cairographics.org
        ReportedBy: maxi at heinzler.de
         QAContact: cairo-bugs at cairographics.org


After two hours of debugging and searching I found the source of this bug.
The win32 backend does not remove font faces from its hash table it they are
about to be destroyed.

I think this code will fix it:
static void
_cairo_win32_font_face_destroy (void *abstract_face)
{
    cairo_win32_font_face_t *font_face = abstract_face;

    _cairo_hash_table_remove (cairo_win32_font_face_hash_table,
                      &font_face->base.hash_entry);
}

I don't know for sure if there also has to be an check for
"font_face->base.hash_entry.hash != 0" like the toy-font backend has it.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the cairo-bugs mailing list