[cairo] Help: pixman code crash

Alexander Shulgin alex.shulgin at gmail.com
Wed May 26 06:36:54 PDT 2010


On Fri, May 14, 2010 at 12:18, Jonathan Morton
<jonathan.morton at movial.com> wrote:
> On Fri, 2010-05-14 at 13:25 +0800, 寒轩 wrote:
>> I get all the cairo depend project and the newest cairo project, and
>> compiled them through "MultiThread" library version(not the dll
>> version) and get three static librarys
>>
>> I found a problem, if I build the cairo as a static lib to use in my
>> project, then the pixman will crash at: "pixman.c(657) : cache =
>> PIXMAN_GET_THREAD_LOCAL (fast_path_cache)" when I do any thing of
>> drawing.
>>
>> All the runtime library of projects(pixman,zlib,libpng,cairo and my
>> project) is MultiThread-debug(not the mt dll), and I also defined
>> CAIRO_WIN32_STATIC_BUILD when build the cairo.
>
> I can't answer your question directly, but I think the people who could
> would benefit from a bit more information.
>
> It looks like you are building on Windows (based on the fact that there
> is a distinction between multithreaded and not).  Could you say which
> version of Windows, and which development environment (and version
> thereof) you are using?
>
> I do know that there has been some recent work on Windows threading
> support.  Therefore please also make sure you are using the latest
> version of Pixman, which is 0.18.2.  If the latest version is what is
> producing the errors, there might be some things left to tidy up.

I was bitten by this problem today and turned out it is up to
__declspec(thread) isn't working in dynamically loaded libraries, but
only in dlls directly loaded at program start.

I removed __declspec(thead) in pixman-complier.h and was able to get
past that failing line of code.

Hope this helps.
--
Alex


More information about the cairo mailing list