[cairo] CAIRO_STATUS_NO_MEMORY when passing incorrect scaling

Behdad Esfahbod behdad at behdad.org
Thu Jan 1 20:57:01 PST 2009


Peter Clifton wrote:
> On Thu, 2009-01-01 at 14:42 -0500, Behdad Esfahbod wrote:
>> Paolo Bonzini wrote:
>>> 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.
>>> If anything, my invalid-size-error branch should change this to an
>>> invalid size error.  I agree that the error should be in the context...
>> The context already goes into CAIRO_STATUS_INVALID_MATRIX.  As I said in the
>> other mail, the NO_MEMORY is a side effect of how nil objects work internally
>> right now.
> 
> Aha.
> 
> Right after the failed operation, I set cairo_matrix_identity() on the
> context, and still, further drawing was not functional on that context.
> Is that considered a known bug, or something to be fixed in the future?

I think I answered this already.  Yes, that's a known bug.  Yes, it will be
fixed in *some* future.  No, no idea when it will be fixed.  Whenever someone
works on it.  No one currently is.  No, it has nothing to do with backends
randomly setting NO_MEMORY on misc errors.

behdad


More information about the cairo mailing list