[cairo] Re : Re : multithreaded bug in cairo on call to cairo stroke?

Andrea Canciani ranma42 at gmail.com
Wed Dec 15 02:32:33 PST 2010


On Wed, Dec 15, 2010 at 11:00 AM, Philippe Leroux <lerouxp at yahoo.ca> wrote:
>
>
> thanks for your answer
> i could give it a try to that pixman threadsafe lib
> however i'm not sure that this is the problem
>
> each of my drawing threads uses it's own surface to draw to,
> they create a surface, a context, draws to them and saves the images
> get a new data set clears the surface, draw again, save another image and so on
> each thread uses independent data sets.
> error always happen when two threads call to cairo stroke or fill
>
> so unless i am missing something here, there is a bug somewhere
> maybe something very tricky

You are probably using the same source in multiple threads, because cairo
tries to be clever and caches solid colors.
Can you please test the attached patch to check if it works around your problem?
It would be a strong hint that you're having problems with atomic refcounting.

> it never bugs in exactly the same way
> (corruption double free, corrupted double-linked list sigabrt segfault)
> sometimes from libpixman, sometimes from libGL, libxcb...
>
> what do you think?
> i've tried looking at cairo-trace... it's a big log file. i'm not sure how i can
> find some insight in it

If the attached patch does not work around your problem, could you provide
a backtrace with debug symbols?

Andrea
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image-no-cache.patch
Type: application/octet-stream
Size: 1177 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20101215/fcd7195f/attachment.obj>


More information about the cairo mailing list