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 86911 - pango assertion fault with open office tt font
pango assertion fault with open office tt font
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.0.x
Other other
: Normal critical
: ---
Assigned To: Owen Taylor
Owen Taylor
: 86849 89698 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-06-30 16:22 UTC by Bastien Nocera
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0



Description Bastien Nocera 2002-06-30 16:22:07 UTC
Trying to display any tt font from OpenOffice in the Gtk+ font selector
leads to a assertion fault, and the font selector disappearing.

** ERROR **: file pangoxft-font.c: line 738 (pango_xft_font_get_font):
assertion failed: (charmap != face->num_charmaps)
aborting...
Trace/breakpoint trap

What I think as the interesting bits from the bt:
  • #5 pango_xft_font_get_font
    from /usr/lib/libpangoxft-1.0.so.0
  • #6 pango_xft_picture_render
    from /usr/lib/libpangoxft-1.0.so.0
  • #7 pango_font_get_metrics
    from /usr/lib/libpango-1.0.so.0
  • #8 pango_fontset_simple_size
    from /usr/lib/libpango-1.0.so.0
  • #9 pango_fontset_get_metrics
    from /usr/lib/libpango-1.0.so.0
  • #10 pango_context_get_metrics
    from /usr/lib/libpango-1.0.so.0
  • #11 gtk_entry_get_type
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #17 gtk_signal_emit_by_name
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 gtk_size_group_remove_widget
    from /usr/lib/libgtk-x11-2.0.so.0
  • #19 _gtk_size_group_compute_requisition
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 gtk_widget_size_request
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gtk_font_selection_new
    from /usr/lib/libgtk-x11-2.0.so.0

Version:
pango 1.0.3-2
X 4.2.0
Xft rendering (with AA enabled)
freetype 2.1.1-3
Arioso from the OpenOffice distribution (seems to also be installed with
StarOffice 6.0)
Comment 1 Luis Villa 2002-07-01 21:14:17 UTC
*** Bug 86849 has been marked as a duplicate of this bug. ***
Comment 2 Luis Villa 2002-07-01 21:15:31 UTC
Other people seeing this too, with other fonts. cc'ing sun as I'm sure
they are interested about problems with their own fonts :) 
Comment 3 Owen Taylor 2002-07-01 22:17:21 UTC
The sequence of problems here is:

 xftcache is run with an old version of FreeType
 FreeType is upgraded to 2.1.0 which can't read
  the openoffice (junk) fonts.
 The Xft cache files don't agree with what FreeType
  knows about the fonts, causing an assertion failure.

I have a Pango patch to not die, but other than that
it is a NOTGNOME problem.

It can be fixed by either upgrading to a newer FreeType
(2.1.1 or 2.1.2 should work) or rerunning xftcache.

OpenOffice no longer actually ships with these fonts.
Comment 4 Bastien Nocera 2002-07-01 22:47:58 UTC
I never ran xftcache, I didn't even know it existed before you told me
about it. Then I ran it, and the font didn't appear in the font
selector anymore (which I guess is the way it deals with broken fonts).

Still it would be nice if it didn't display anything, or some error
instead of just crapping out, just like gdk-pixbuf doesn't crap out
when you feed it incomplete images.

I agree that it shouldn't be Pango's problem, but it still is a shame
seeing a Gtk+ app die like that. And there I'm going to add my grain
of salt, saying that assertions are supposed to guard against
programming errors, not user/machine/system input problems.

In the end, please commit your work-around :)
Comment 5 Michael Toomim 2002-07-05 06:44:39 UTC
I have freetype 2.1.1, and that didn't fix the problem (although
xftcache does).  2.1.2 maybe?
Comment 6 Owen Taylor 2002-07-10 10:20:28 UTC
Committed the patch I had around:

Wed Jul  3 18:39:45 2002  Owen Taylor  <otaylor@redhat.com>

        * pango/pangoft2.c pango/pangoxft-font.c: Be more
        robust when trying to set the unicode character
        map on the font. (#86911)
Comment 7 Owen Taylor 2002-08-02 15:21:53 UTC
*** Bug 89698 has been marked as a duplicate of this bug. ***
Comment 8 Lukas Hejtmanek 2002-08-02 16:21:09 UTC
I have freetype 2.1.2, I've deleted all XftCache files in font
directories and pango crashes no more.