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 540617 - Pango-WARNING **: Error loading GPOS table 5503
Pango-WARNING **: Error loading GPOS table 5503
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.20.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-06-28 14:20 UTC by Loïc Minier
Modified: 2009-03-01 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The font file (454.35 KB, application/octet-stream)
2008-06-29 18:23 UTC, Carlo Wood
Details

Description Loïc Minier 2008-06-28 14:20:43 UTC
Hi,

Carlo Wood reported in Debian bug http://bugs.debian.org/484995:
"""
While running the command doxygen for my project,
which somewhere runs 'dot graph_legend.dot -Tpng:gd -o
graph_legend.png', dot prints:
Pango-WARNING **: Error loading GPOS table 5503

This occurs because in line
pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c:664,
error is set to HB_Err_Invalid_SubTable_Format:

663	  default:
664	    return ERR(HB_Err_Invalid_SubTable_Format);

This is a switch for the variable an->PosFormat in line 575:

575	  switch ( an->PosFormat )

an->PosFormat has value 56 at that moment, and was read just
before on line 571:

571	  an->PosFormat = GET_UShort();

GET_UShort is a macro that depends on stream->cursor

stream is at the point:

(gdb) p *stream
$112 = {base = 0x2b7330d17000 "", size = 465256, pos = 454286,
descriptor = {value = 47773740265472, pointer = 0x2b7330d17000},
pathname = {value = 6732768, pointer = 0x66bbe0}, read = 0,
close = 0x2b732ee23b90, memory = 0x62b960, cursor = 0x2b7330d85e8e "",
limit = 0x2b7330d85e8e ""}

The file associated with this stream is:

(gdb) p *((char(*)[60])stream.pathname.pointer)
$77 = "/usr/share/fonts/truetype/freefont/FreeSans.ttf\000\000\000\000\000\000\000\000\000q\000\000"

> dpkg -S /usr/share/fonts/truetype/freefont/FreeSans.ttf
ttf-freefont: /usr/share/fonts/truetype/freefont/FreeSans.ttf
>dpkg -l ttf-freefont
+++-==============-==============-============================================
ii  ttf-freefont   20080323-3     Freefont Serif, Sans and Mono Truetype fonts
>md5sum /usr/share/fonts/truetype/freefont/FreeSans.ttf
903788b0c6066dc3341fcb8bdd492ddc /usr/share/fonts/truetype/freefont/FreeSans.ttf

Backtrace at the moment that the error occurs:
(gdb) bt
  • #0 Load_Anchor
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c line 573
  • #1 Load_Mark2Array
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c line 2803
  • #2 Load_MarkMarkPos
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c line 2927
  • #3 _HB_GPOS_Load_SubTable
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c line 5878
  • #4 Load_SubTable
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-open.c line 458
  • #5 Load_Lookup
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-open.c line 536
  • #6 _HB_OPEN_Load_LookupList
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-open.c line 618
  • #7 HB_Load_GPOS_Table
    at /home/carlo/tmp/pango1.0-1.20.2/pango/opentype/harfbuzz-gpos.c line 141
  • #8 pango_ot_info_get_gpos
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-info.c line 352
  • #9 get_tables
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-info.c line 385
  • #10 pango_ot_info_find_script
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-info.c line 433
  • #11 pango_ot_ruleset_new_for
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-ruleset.c line 253
  • #12 pango_ot_ruleset_new_from_description
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-ruleset.c line 299
  • #13 pango_ot_ruleset_get_for_description
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-ot-ruleset.c line 149
  • #14 ??
    from /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
  • #15 _pango_engine_shape_shape
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-engine.c line 71
  • #16 pango_shape
    at /home/carlo/tmp/pango1.0-1.20.2/pango/shape.c line 55
  • #17 shape_run
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 3072
  • #18 process_item
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 3182
  • #19 process_line
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 3475
  • #20 pango_layout_check_lines
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 3802
  • #21 pango_layout_get_extents_internal
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 2411
  • #22 pango_layout_get_extents
    at /home/carlo/tmp/pango1.0-1.20.2/pango/pango-layout.c line 2591
  • #23 pango_textlayout
    at gvtextlayout_pango.c line 162
  • #24 gvtextlayout
    at gvtextlayout.c line 49
  • #25 textsize
    at fontmetrics.c line 210
  • #26 storeline
    at labels.c line 33
  • #27 make_label
    at labels.c line 145
  • #28 common_init_node
    at utils.c line 632
  • #29 dot_init_node_edge
    at dotinit.c line 23
  • #30 dot_layout
    at dotinit.c line 226
  • #31 gvLayoutJobs
    at gvlayout.c line 69
  • #32 main
    at dot.c line 180

Let me know if I should for additional information.  I'll ask whether he can reproduce with pango-view directly.

Bye,
Comment 1 Behdad Esfahbod 2008-06-29 18:17:09 UTC
Wow, nice debugging...

Please attach the font file to this bug.  Providing a pango-view command to reproduce with that font file installed is even better.
Comment 2 Behdad Esfahbod 2008-06-29 18:17:47 UTC
Humm, no pango-view needed as this will happen on font load time.
Comment 3 Carlo Wood 2008-06-29 18:23:42 UTC
Created attachment 113636 [details]
The font file

Here's the requested font file.
Comment 4 Loïc Minier 2008-06-29 18:25:12 UTC
 % pango-view --font=FreeSans /etc/passwd
 (pango-view:31602): Pango-WARNING **: Error loading GPOS table 5503

 % fc-match FreeSans
 FreeSans.ttf: "FreeSans" "Medium"
Comment 5 Behdad Esfahbod 2009-01-07 01:17:52 UTC
Pango trunk parses that file without problem.