Bug 18632 - failed assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)' when using cairo quartz backend
Summary: failed assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)' ...
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: quartz backend (show other bugs)
Version: 1.9.1
Hardware: PowerPC Mac OS X (All)
: medium major
Assignee: Vladimir Vukicevic
QA Contact: cairo-bugs mailing list
URL: https://bugs.freedesktop.org/attachme...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 04:22 UTC by Paolo Bonzini
Modified: 2008-12-14 05:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Paolo Bonzini 2008-11-20 04:22:03 UTC
Trying to reproduce bug 15797 with current git (63a86a470f) I found that the bug is not anymore reproducible because cairo crashes earlier with an assertion failure.

The program is at https://bugs.freedesktop.org/attachment.cgi?id=16307

It works correctly with an image surface (try uncommenting this line:

  /* #undef CAIRO_HAS_QUARTZ_SURFACE */

to test).
Comment 1 Asko Kauppi 2008-12-09 02:12:24 UTC
I can reproduce this bug on any of the systems (OS X PowerPC/Intel, Linux x86, Windows XP).

It is a statistical bug, happening randomly. To repeat:

1. Get "TexasFlag" project from Google pages or subversion (recommended):

   http://akauppi.googlepages.com/TX-20081127.tgz
   svn co svn://slugak.dyndns.org/public/2009/TX

2. "make run"

4. There should be a Texas flag drawn in a GUI window. 

5. Start resizing the window by dragging from its corner.  Within a second or so, you'd get a crash.

On OS X, it may be beneficial to start the utility like (gives you the console log):

$ TexasFlag.app/Contents/MacOS/TexasFlag 
Assertion failed: (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count)), function cairo_destroy, file cairo.c, line 218.

Running Cairo 1.8.4 on all the systems.

Comment 2 Paolo Bonzini 2008-12-09 06:48:31 UTC
See http://permalink.gmane.org/gmane.comp.lib.cairo/15727 for analysis and patches.
Comment 3 Paolo Bonzini 2008-12-09 06:49:48 UTC
Asko's failure is not related to this bug (this bug is for a failure in cairo-quartz-surface.c with the example program in the attachment).
Comment 4 Chris Wilson 2008-12-14 05:10:49 UTC
(In reply to comment #1)
> $ TexasFlag.app/Contents/MacOS/TexasFlag 
> Assertion failed: (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count)),
> function cairo_destroy, file cairo.c, line 218.
> 
> Running Cairo 1.8.4 on all the systems.

This is most likely to be an application bug - if you can reproduce this with a minimal test case please open a new bug.

Jeff Muizelaar fixed the invalid referencing of the uncopied pattern, the original bug, with commit 
d93bf10edc7e432349524221a3d1b0f0b2ec8090.


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.