After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625998 - (nuuzerpogodible) Segmentation fault in pango_glyph_string_extents_range
(nuuzerpogodible)
Segmentation fault in pango_glyph_string_extents_range
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.28.x
Other Linux
: Normal major
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2010-08-04 06:00 UTC by Anton Fedorov
Modified: 2017-08-31 22:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30



Description Anton Fedorov 2010-08-04 06:00:56 UTC
Here is digg into problem:

(gdb) bt
  • #0 pango_glyph_string_extents_range
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/glyphstring.c line 218
  • #1 pango_glyph_string_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/glyphstring.c line 288
  • #2 pango_layout_run_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 4454
  • #3 pango_layout_line_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 4615
  • #4 get_line_extents_layout_coords
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2378
  • #5 pango_layout_get_extents_internal
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2489
  • #6 pango_layout_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2611
  • #0 pango_glyph_string_extents_range
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/glyphstring.c line 218
  • #1 pango_glyph_string_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/glyphstring.c line 288
  • #2 pango_layout_run_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 4454
  • #3 pango_layout_line_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 4615
  • #4 get_line_extents_layout_coords
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2378
  • #5 pango_layout_get_extents_internal
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2489
  • #6 pango_layout_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2611
  • #7 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #6 pango_layout_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 2611
  • #4 get_line_extents_layout_coords
  • #2 pango_layout_run_get_extents
    at /home/datacompboy/tmp/pango/pango1.0-1.28.1/pango/pango-layout.c line 4454
  • #1 pango_glyph_string_extents
  • #0 pango_glyph_string_extents_range
    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).
Comment 1 Anton Fedorov 2010-08-04 06:30:42 UTC
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}}
Comment 2 Anton Fedorov 2010-08-04 06:35:59 UTC
http://www.4shared.com/file/9tH-QWEf/core1.html
full core file with debug information