[cairo] Cairo 1.8 crashes when creating PDF (OS X 10.5 PowerPC)
Paolo Bonzini
bonzini at gnu.org
Tue Dec 9 04:48:30 PST 2008
Asko Kauppi wrote:
>
> If you add 'cairo_show_text()' to the mix, the crash is there.
>
> This one gives "Bus error", other circumstances can give "Segmentation
> fault".
Yes, the two are interchangeable. (I can reproduce it too, using the
tip of the master branch; I'm on Tiger though I doubt it is of any
importance). The crash is in the Quartz font backend (my Cairo has both
the Quartz font backend and the freetype fond backend):
#0 0x0024f22c in _cairo_quartz_scaled_to_face (abstract_font=0x1307710)
at cairo-quartz-font.c:274
#1 0x0024f730 in _cairo_quartz_font_scaled_glyph_init
(abstract_font=0x1307860, scaled_glyph=0x1307ff0,
info=CAIRO_SCALED_GLYPH_INFO_METRICS) at cairo-quartz-font.c:453
#2 0x00228dc0 in _cairo_scaled_glyph_lookup (scaled_font=0x1307860,
index=0, info=CAIRO_SCALED_GLYPH_INFO_METRICS,
scaled_glyph_ret=0xbfffdd18) at cairo-scaled-font.c:2377
#3 0x0023921c in _cairo_sub_font_map_glyph (sub_font=0x13040f0,
scaled_font_glyph_index=0, utf8=0x0, utf8_len=-1,
subset_glyph=0xbfffddf8) at cairo-scaled-font-subsets.c:475
#4 0x002395dc in _cairo_sub_font_create (parent=0x13013a0,
scaled_font=0x1307860, font_id=0, max_glyphs_per_subset=256,
is_scaled=0, is_composite=0, sub_font_out=0xbfffde98) at
cairo-scaled-font-subsets.c:296
#5 0x00239a98 in _cairo_scaled_font_subsets_map_glyph
(subsets=0x13013a0, scaled_font=0x1307860, scaled_font_glyph_index=68,
utf8=0x13073f0 "abc{", utf8_len=1, subset_glyph=0xbfffdf90) at
cairo-scaled-font-subsets.c:804
HTH,
Paolo
> #include <cairo.h>
> #include <cairo-pdf.h>
>
> int main ()
> {
> cairo_surface_t *surface = cairo_pdf_surface_create("out_c.pdf", 120, 120);
> cairo_t *cr = cairo_create (surface);
>
> cairo_move_to( cr, 60,60 );
> cairo_show_text( cr, "abc" );
> cairo_stroke(cr);
>
> cairo_destroy (cr);
> cairo_surface_destroy (surface);
> }
More information about the cairo
mailing list