Cairo diagrams backend on OSX assertion failed (bug?)

Evan Rinehart <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAKRavj4uO5pnvQxwJC7s=pevNW=ReO4mLw24pJOqkO0jfh_CKw@mail.gmail.com>
Synopsis, I was testing the haskell library diagrams (
http://projects.haskell.org/diagrams/ ) with its cairo backend on OSX to
render some simple text. But running the program to generate an svg (or
png) that contains nothing but a single word results in the following error
from cairo:

```
Assertion failed: (!scaled_font->cache_frozen), function
_cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Abort trap: 6
```

I talked to bergey one of the developers for the cairo backend of diagrams
and after some brain-wracking he suggested to submit a bug report to cairo.

Steps to reproduce.

This is OSX 10.8.5
cairo-1.14.0 installed via homebrew
pango-1.36.8 installed via homebrew
ghc-7.8.3
diagrams-cairo-1.2.0.6

The following haskell program takes an output file name and dimensions to
render a single word.

```
module Main where

import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine

main = mainWith (text "SUPER" :: Diagram B R2)
```

ghc -o a.out Main.hs
./a.out -o out.svg -w 100 -h 100

```
Assertion failed: (!scaled_font->cache_frozen), function
_cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Abort trap: 6
```

Since past reports of this error in cairo seems to involve thread safety
issues, it may be that to trigger this error you need to have different
text instead of "SUPER" or to run this on a different phase of the moon,
but I get that error 100% of the time so far. Changing the output file
extension to .png or some other format (in order to use a different
backend) results in the same failed assertion.

I included my pango version because diagrams-cairo now uses pango instead
of the toy text API to deal with text formatting.

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.