[cairo] getting assertions [cairo_cache.c:143: _entry_destroy: Assertion `cache->used_memory > entry->memory' failed]

Carl Worth cworth at cworth.org
Tue Nov 23 11:26:42 PST 2004


On Mon, 22 Nov 2004 17:57:35 -0800, Ned Konz wrote:
> If you comment out the cairo_text_extents() call you get a different 
> assertion.

The first one you're hitting here was just a buggy assertion, (> instead
of >=). I just committed a fix for that. Phil had first pointed out the
bug a week or two ago.

As for the second bug. Your code is doing:

>     cairo_scale_font(cairo, 72);
>     cairo_text_extents(cairo, "72", &extents);
>     cairo_scale_font(cairo, 72);

The two consecutive calls to cairo_scale_font result in a font size of
5184 units. I'm guessing that's not what you actually want here.

But, of course, cairo should let you draw that if you do want to. Phil
had noticed this bug too, and we've got it listed in the cairo/BUGS file
now.

Best of luck!

-Carl



More information about the cairo mailing list