GNOME Bugzilla – Bug 625998
Segmentation fault in pango_glyph_string_extents_range
Last modified: 2017-08-31 22:52:14 UTC
Here is digg into problem: (gdb) bt
+ Trace 223103
ink_rect=0x7fff3437acc0, logical_rect=0x7fff3437acb0) at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/glyphstring.c:218 218 pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph, (gdb) p i $35 = 1 == as you can see, addr of glyphs is not changed, so address itself correct. But before pango_glyph_string_extents_range was called, glyphs->num_glyphs was equals to 4 (end=4 in frame 0), but after first iteration (i==1 on crash) that value it get corrupted, along with link to glyphs).
Additional info: (gdb) p *((PangoFontClass*)font->parent_instance->g_type_instance->g_class) $62 = {parent_class = {g_type_class = {g_type = 62221904}, construct_properties = 0x3b45120, constructor = 0x7fb771ac36c0, set_property = 0, get_property = 0, dispose = 0x7fb771ac0240, finalize = 0x7fb76f5917ad <pango_cairo_fc_font_finalize>, dispatch_properties_changed = 0x7fb771ac2410, notify = 0, constructed = 0, flags = 1, pdummy = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, describe = 0x7fb76f9b9cc2 <pango_fc_font_describe>, get_coverage = 0x7fb76f9b9dfb <pango_fc_font_get_coverage>, find_shaper = 0x7fb76f9b9db0 <pango_fc_font_find_shaper>, get_glyph_extents = 0x7fb76f5917e7 <pango_cairo_fc_font_get_glyph_extents>, get_metrics = 0x7fb76f58ca61 <_pango_cairo_font_get_metrics>, get_font_map = 0x7fb76f9ba5b0 <pango_fc_font_get_font_map>, describe_absolute = 0x7fb76f9b9ce8 <pango_fc_font_describe_absolute>, _pango_reserved1 = 0, _pango_reserved2 = 0} (gdb) p *((PangoFontClass*)font->parent_instance->g_type_instance->g_class)->get_glyph_extents $63 = {void (PangoFont *, PangoGlyph, PangoRectangle *, PangoRectangle *)} 0x7fb76f5917e7 <pango_cairo_fc_font_get_glyph_extents> (gdb) p (PangoCairoFcFont *)font $64 = (PangoCairoFcFont *) 0x3b32870 (gdb) p *((PangoCairoFcFont *)font) $65 = {font = {parent_instance = {parent_instance = {g_type_instance = {g_class = 0x3b32120}, ref_count = 437, qdata = 0x41f3420}}, font_pattern = 0x3b478f0, fontmap = 0x2b2bbf0, priv = 0x3b32930, matrix = {xx = 1, xy = 0, yx = 0, yy = 1, x0 = 0, y0 = 0}, description = 0x3b1ca90, metrics_by_lang = 0x0, is_hinted = 1, is_transformed = 0}, cf_priv = {cfont = 0x3b32870, data = 0x0, scaled_font = 0x3b43d60, hbi = 0x4f9aad0, is_hinted = 1, gravity = PANGO_GRAVITY_SOUTH, font_extents = {x = 0, y = -15360, width = 0, height = 19456}, glyph_extents_cache = 0x3b5ffe0, metrics_by_lang = 0x3b8d610}}
http://www.4shared.com/file/9tH-QWEf/core1.html full core file with debug information