Bug 22689

Summary: text-antialias-gray-test-meta-argb32 test crashes
Product: cairo Reporter: David Keeler <keelerda>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.8.8   
Hardware: x86 (IA32)   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:

Description David Keeler 2009-07-09 11:58:00 UTC
text-antialias-gray-test-meta-argb32 test fails with a crash on OS X 10.5.7

Here's the relevant parts of the crash report:

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000003795ff7d
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib             	0x9548ce42 __kill + 10
1   libSystem.B.dylib             	0x954ff23a raise + 26
2   libSystem.B.dylib             	0x9550b679 abort + 73
3   libSystem.B.dylib             	0x955003db __assert_rtn + 101
4   libcairo.2.dylib              	0x000b79b2 _cairo_hash_table_destroy + 130 (cairo-hash.c:201)
5   libcairo.2.dylib              	0x000ca095 _cairo_scaled_font_map_destroy + 165 (cairo-scaled-font.c:394)
6   libcairo.2.dylib              	0x000b37f7 _cairo_font_face_reset_static_data + 23 (cairo-font-face.c:772)
7   libcairo.2.dylib              	0x000b2deb cairo_debug_reset_static_data + 11 (cairo-debug.c:67)
8   text-antialias-gray           	0x00002791 cairo_test_fini + 113 (cairo-test.c:224)
9   text-antialias-gray           	0x00004926 cairo_test + 518 (cairo-test.c:1359)
10  text-antialias-gray           	0x000022bb main + 27 (text-antialias-gray.c:84)
11  text-antialias-gray           	0x00002026 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00000000  ebx: 0x9550b639  ecx: 0xbffff29c  edx: 0x9548ce42
  edi: 0x0080c800  esi: 0x0010b91a  ebp: 0xbffff2b8  esp: 0xbffff29c
   ss: 0x0000001f  efl: 0x00200286  eip: 0x9548ce42   cs: 0x00000007
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0xa0655938
Comment 1 David Keeler 2009-07-09 13:34:04 UTC
This is probably a regression.
According to ChangeLog.pre-1.4:
...
commit e107b70b4d282d78ebe32f4d2381fcf98df324f6
Author: Carl Worth <cworth@cworth.org>
Date:   Sat Feb 10 09:39:09 2007 -0800

    Add locking to cairo_font_face_reference/destroy

    The reference count of cairo_font_face_t is rather intimately tied,
    (for toy font faces), with the cairo_font_face_hash_table, so we    expand the existing cairo_toy_font_face_hash_table_mutex to cover
    the manipulation of font_face->ref_count as well.

    This commit eliminates an assertion failure that is (occasionally)
    exposed by the pthread-show-text test case:

    lt-pthread-show-text: cairo-hash.c:196: _cairo_hash_table_destroy: Assertion
 `hash_table->live_entries == 0' failed.

 src/cairo-font.c |   21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)
...
Comment 2 Andrea Canciani 2010-10-30 14:50:20 UTC
I'm unable to reproduce this problem on OSX 10.6 with cairo/master.
Could you try upgrading to 1.10 and check if it still affects you?
Comment 3 David Keeler 2010-10-31 12:11:18 UTC
I don't have OSX any more, so I can't reproduce it either.  If it works for you, then I assume it's been fixed.

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.