[cairo] segment fault when rendering text with space charactors onto glitz surface.

David Reveman davidr at novell.com
Tue Aug 9 14:52:38 PDT 2005

On Tue, 2005-08-09 at 14:28 -0700, Vladimir Vukicevic wrote:
> On 8/9/05, David Reveman <davidr at novell.com> wrote:
> > On Tue, 2005-08-09 at 09:51 -0700, Vladimir Vukicevic wrote:
> > > Here's an updated patch for this issue, as well as not initializing
> > > the memory entry member (I sent both patches separately earlier, this
> > > is both combined and updated to latest CVS).  Carl/David, let me know
> > > if it's ok to commit this..
> > 
> > It's OK commit it.
> > 
> > I'm not sure the:
> > (area == &_empty_area)
> > check is necessary as the code should never try top move in areas with
> > width == 0 or height == 0 but I might be wrong so it's OK to commit it
> > as it is, I'll change it later if it turns out not necessary.
> Hmm, so applying this patch to current CVS (with my patch checked in)
> still caused a slightly different crash with 0-space characters.  The
> attached patch fixes it, but at this point I'm just playing
> whack-a-mole without a full understanding of the glitz glyph caching
> implementation... in any case I'd like to check the patch in, since
> text seems to render with it, but I have no idea about the correctness
> -- specifically, I'm not sure why we ever have an image_entry->image
> for a space character.  The move_in check isn't needed with this...

Go ahead and check that in if it seems to fix things. :-) 

The glitz glyph caching is pretty simple. One texture for caching the
last used glyphs and a simple 2D memory manager (glitz_area_XXX) for
positioning glyphs in the texture. However, I'm not sure I fully
understand the higher level image glyph cache in cairo. I should
probably have another look at that when I have some spare time.


More information about the cairo mailing list