[cairo] CAIRO_STATUS_NO_MEMORY when passing incorrect scaling
Peter Clifton
pcjc2 at cam.ac.uk
Thu Jan 1 10:54:17 PST 2009
On Thu, 2009-01-01 at 10:21 -0500, Behdad Esfahbod wrote:
> Peter Clifton wrote:
> > Hi guys,
> >
> > I noticed, as I was debugging some drawing code, that after a certain
> > error in my code, all further cairo output was stopped.
> >
> > I tracked the problem down to an incorrect scale factor I was passing to
> > cairo_scale(), I was in fact passing the X scale factor as 0. due to a
> > corner case being hit at a certain zoom factor.
>
> Yeah, that's a bug that we need to fix. Scaling down to zero should not be an
> error.
>
> > What puzzled me in trying to track this down, is that the surface's
> > error state was CAIRO_STATUS_NO_MEMORY (at least,
> > cairo_status_to_string() reported no memory).
>
> That sounds wrong. You shouldn't get an error on the surface at all.
> Should get it on the context.
Hmm, I didn't check cairo_status, I checked cairo_surface_status
(cairo_target (cr)).
I don't have the buggy code to hand any more, but I can try to reproduce
if you want.
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the cairo
mailing list