[cairo-bugs] [Bug 4299] Assertion fails in "cairo-font.c" when using multithreads

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 14 11:36:41 PDT 2005


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=4299          
     




------- Additional Comments From cworth at cworth.org  2005-09-14 11:36 -------
Sorry, I should have retested against your original test (CairoTest.cpp). I've
done that now. The test has a bug in the handling of isActive, (modified by
multiple threads), which often makes the test exit before it gets started. I've
worked around this with the following simple patch:

--- CairoTest.cpp.orig  2005-09-14 10:55:13.656682400 -0700
+++ CairoTest.cpp       2005-09-14 11:05:47.531318808 -0700
@@ -323,7 +323,7 @@
             pthread_create(&tid, NULL,MyThreadProc, this);
         }
         // wait until all threads completed
-        while (isActive) {
+        while (true) {
             sleep(10 /*00*/);
         }

I also cleaned up the Makefile to remove an errant tab, use pkg-config to find
libraries rather than assume they are installed in local directories, and remove
the -pedantic flag which complains about a trailing comma in an enumerator list
in svg.h. Here's the patch for those things:

--- Makefile.orig       2005-09-14 11:06:46.881296240 -0700
+++ Makefile    2005-09-14 10:58:21.669100168 -0700
@@ -3,18 +3,17 @@

 SOURCES := \
        CairoTest.cpp
-

 OBJECTS := $(SOURCES:.cpp=.o)


 CC =/usr/bin/g++
-CFLAGS =   -I ./cairo -ansi
+CFLAGS = `pkg-config --cflags libsvg-cairo`

-LIB_PATH = -L ./libs
+LIB_PATH = `pkg-config --libs libsvg-cairo`
 LIBS =     -lcairo -lsvg-cairo

-DFLAGS = -g -pedantic
+DFLAGS = -g
 #DEFINES = -DLINUX -DGCC_296 -DDEBUG
 DEFINES = -DLINUX

If the test builds and runs fine for you, you shouldn't necessarily need any of
the above. I just wanted to include them for completeness in case we have more
trouble replicating behavior.

With those patches in place, I have made four builds of cairo, and installed
each one to a separate location by means of the --prefix argument to configure,
(for example, "./configure --prefix=/opt/cairo-head").

1) cairo-head: a build from "cvs checkout" as of now, (meaning it includes the
committed HEAD patches attached above).

2) cairo-1.0.1: a build from "cvs checkout -r BRANCH_1_0" as of now, (meaning it
includes the committed BRANCH_1_0 patches attached above).

3) cairo-1.0.0: a build from the tar file:
http://cairographics.org/releases/cairo-1.0.0.tar.gz

4) cairo-1.0.0-with-4299-patches: same tar file as (3) but with the two
BRANCH_1_0 patches applied manually first, (one reject in the ChangeLog which I
ignored).

I'm running the test by setting LD_LIBRARY_PATH to the appropriate directories
in turn. For example:

LD_LIBRARY_PATH=/opt/cairo-head/lib:${LD_LIBRARY_PATH} ./MyTest map_asu.svg 30

I've performed several runs of this test as above, changing only the initial
directory provided to LD_LIBRARY_PATH. The results I see are as follows:

cairo-1.0.0
-----------
Program crashes with "Assertion `i < font_map->num_holdovers' failed." every
time, (after many "Started thread" messages print but before any "Conversion
completed" messages).

cairo-1.0.0-with-4299-patches, cairo-1.0.1, cairo-head
------------------------------------------------------
No crashes seen in any attempts. Program always runs, continuously printing
"Conversion completed" messages until I get bored and terminate it, (I've run it
against each version for at least about two minutes).

Can you test again, and if you are still finding problems try to identify what
is different between our test procedures?

Thanks,

-Carl

          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list