Crash when using pango_cairo_show_layout on 64bit linux



Hi, all -

I'm in the midst of trying to get text drawn using
pango_cairo_show_layout().  My code works fine on 32bit linux, but on
64bit it crashes in the depths (stack-trace at the end of this mail).

At first I thought it was crashing because of a non-existent font, but I
tried a variety of different ones ... and they work fine w/ GTK but for
some reason I'm having a problem.

My code looks like this: (called from within an "expose_event" callback
from a gtk_drawing_area ).  Any ideas would be very much appreciated,
thanks!

...
    cairo_t *cr = (cairo_t *) nn->handle;

    PangoLayout *layout;
    PangoFontDescription *desc = (PangoFontDescription *)nn->font;

    layout = pango_cairo_create_layout (cr);

    if (desc) pango_layout_set_font_description (layout, desc);
    pango_layout_set_text (layout, s->buf, -1);

   
    pango_cairo_update_layout (cr, layout);
    pango_cairo_show_layout (cr, layout);

    g_object_unref (layout);
...


Here is the stack-trace:

#0  IA__FcPatternBuild (p=p entry=0x0) at fcpat.c:1096
#1  0x00002aaaadc3af54 in pango_fc_make_pattern (dpi=96,
pixel_size=19115, language=0x2aaab40fb7c8, description=0x2aaab40ed890)
    at /build/buildd/pango1.0-1.32.5/./pango/pangofc-fontmap.c:1445
#2  pango_fc_fontset_key_make_pattern (key=0x2aaab3a276f8) at
/build/buildd/pango1.0-1.32.5/./pango/pangofc-fontmap.c:1620
#3  pango_fc_font_map_get_patterns (key=0x2aaab3a276f8,
fontmap=0x2aaab40ecac0) at
/build/buildd/pango1.0-1.32.5/./pango/pangofc-fontmap.c:1634
#4  pango_fc_font_map_load_fontset (fontmap=0x2aaab40ecac0,
context=<optimized out>, desc=<optimized out>, language=<optimized out>)
    at /build/buildd/pango1.0-1.32.5/./pango/pangofc-fontmap.c:1737
#5  0x00002aaaac2ceff1 in itemize_state_update_for_new_run
(state=0x2aaab3a27818, state entry=0x2aaab3a27298)
    at /build/buildd/pango1.0-1.32.5/./pango/pango-context.c:1387
#6  itemize_state_process_run (state=state entry=0x2aaab3a27818) at
/build/buildd/pango1.0-1.32.5/./pango/pango-context.c:1426
#7  0x00002aaaac2cfcaa in pango_itemize_with_base_dir
(context=<optimized out>, base_dir=base_dir entry=PANGO_DIRECTION_LTR,
text=<optimized out>,
    start_index=<optimized out>, length=length entry=13,
attrs=attrs entry=0x2aaab40c82e0,
cached_iter=cached_iter entry=0x2aaab40c82a0)
    at /build/buildd/pango1.0-1.32.5/./pango/pango-context.c:1565
#8  0x00002aaaac2d6fbe in pango_layout_check_lines
(layout=0x2aaab40fc020) at
/build/buildd/pango1.0-1.32.5/./pango/pango-layout.c:3945
#9  pango_layout_check_lines (layout=0x2aaab40fc020) at
/build/buildd/pango1.0-1.32.5/./pango/pango-layout.c:3847
#10 0x00002aaaac2d9660 in pango_layout_get_iter
(layout=layout entry=0x2aaab40fc020) at
/build/buildd/pango1.0-1.32.5/./pango/pango-layout.c:5598
#11 0x00002aaaac2dea79 in pango_renderer_draw_layout
(renderer=renderer entry=0x2aaab40ecb60,
layout=layout entry=0x2aaab40fc020, x=x entry=0, y=y entry=0)
    at /build/buildd/pango1.0-1.32.5/./pango/pango-renderer.c:181
#12 0x00002aaaabdad438 in _pango_cairo_do_layout (cr=0x2aaab40f0c00,
layout=0x2aaab40fc020, do_path=0) at
/build/buildd/pango1.0-1.32.5/./pango/pangocairo-render.c:877

-- 
For confidential messages, please use my GnuPG key
http://ronware.org/gpg_key.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]