[cairo-bugs] [Bug 38049] Hash table contains zero referenced font faces!
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 8 03:10:25 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=38049
--- Comment #1 from Andrea Canciani <ranma42 at gmail.com> 2011-06-08 03:10:20 PDT ---
(In reply to comment #0)
> After two hours of debugging and searching I found the source of this bug.
Which bug?
I get a font-related crash in the testsuite on win32, but it is not fixed by
your patch, so I assume you are seeing some other crash.
> 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.
I think that you should not be accessing cairo_win32_font_face_hash_table
directly, but using _lock()/_unlock().
--
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