[cairo] Very large number of lines

Arjen Nienhuis a.g.nienhuis at gmail.com
Mon Aug 30 03:45:54 PDT 2010


With the todays git I get the same pdf and:

0
0
0
0
0
7

So

  cairo_destroy(cr); cairo_status(cr);

returns CAIRO_STATUS_NULL_POINTER

On Mon, Aug 30, 2010 at 12:28 PM, Arjen Nienhuis <a.g.nienhuis at gmail.com>wrote:

>   cairo_stroke(cr);
>   std::cout << cairo_status(cr) << std::endl;
>   cairo_surface_finish(surface);
>   std::cout << cairo_status(cr) << std::endl;
>   cairo_surface_flush(surface);
>   std::cout << cairo_status(cr) << std::endl;
>   cairo_surface_destroy(surface);
>   std::cout << cairo_status(cr) << std::endl;
>   cairo_destroy(cr);
>   std::cout << cairo_status(cr) << std::endl;
>
> gives me:
>
> 0
> 0
> 0
> 0
> 0
> 0
>
> And there is plenty of memory. I did an strace and i ran it in gdb and
> there are no errors. The pdf file is there without /Kids.
>
> 1 0 obj
> << /Type /Pages
>    /Kids [ ]
>    /Count 0
> >>
> endobj
> 2 0 obj
> << /Creator (cairo 1.8.10 (http://cairographics.org))
>    /Producer (cairo 1.8.10 (http://cairographics.org))
> >>
>
> On Mon, Aug 30, 2010 at 12:18 PM, Andrea Canciani <ranma42 at gmail.com>wrote:
>
>> On Mon, Aug 30, 2010 at 12:04 PM, Arjen Nienhuis <a.g.nienhuis at gmail.com>
>> wrote:
>> > Hi,
>> > If you stroke each line you need (on my system) 500 bytes per line. That
>> > would be 10GB RAM. I don't have that. You can use swap (and you need 64
>> > bits), but it will be very slow.
>> > If you try to create a path with 20 milion subpaths, cairo will fail
>> > silently(!!!) which I think is a bug.
>> It doesn't fail silently. Check the status of cr after cairo_stroke.
>> It will say that
>> you don't have enough memory (CAIRO_STATUS_NO_MEMORY).
>> You might also want to check the status after finishing the surface
>> (before destroying it).
>> Andrea
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100830/7819ae49/attachment.htm>


More information about the cairo mailing list