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 68030 - every gnome2 app crashes on startup (with GDK_USE_XFT=1 set)
every gnome2 app crashes on startup (with GDK_USE_XFT=1 set)
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
0.x
Other other
: Normal blocker
: 1.0.0
Assigned To: Alexander Larsson
Alexander Larsson
Depends on:
Blocks:
 
 
Reported: 2002-01-04 18:08 UTC by Jeroen Zwartepoorte
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeroen Zwartepoorte 2002-01-04 18:08:53 UTC
After compiling gnome2 today using vbs, all gnome2 applications (not
gtk-demo) segfault on startup right after the "1.3 is unstable etc"
message. Everything worked fine using a build from less than a week ago.

I don't have a ~/.gtkrc-2.0, so it uses the default settings. GDK_USE_XFT=1
is set.

Here's a backtrace of gnome-about:

Gtk-Message: YOU ARE USING THE DEVEL BRANCH 1.3.x OF GTK+ WHICH IS CURRENTLY
                UNDER HEAVY DEVELOPMENT AND FREQUENTLY INTRODUCES
INSTABILITIES.                if you don't know why you are getting this,
you probably want to                use the stable branch which can be
retrieved from
                ftp://ftp.gtk.org/pub/gtk/v1.2/ or via CVS with
                cvs checkout -r glib-1-2 glib; cvs checkout -r gtk-1-2 gtk+

Program received signal SIGSEGV, Segmentation fault.

Thread 1024 (LWP 20931)

  • #0 XftPatternFind
    from /usr/X11R6/lib/libXft.so.1
  • #1 XftPatternGet
    from /usr/X11R6/lib/libXft.so.1
  • #2 XftPatternGetString
    from /usr/X11R6/lib/libXft.so.1
  • #3 pango_xft_pattern_hash
    at pangoxft-fontmap.c line 190
  • #4 g_hash_table_lookup
    at ghash.c line 192
  • #5 pango_xft_font_map_new_font
    at pangoxft-fontmap.c line 497
  • #6 pango_xft_font_map_load_fontset
    at pangoxft-fontmap.c line 633
  • #7 pango_font_map_load_fontset
    at pango-fontmap.c line 128
  • #8 add_engines
    at pango-context.c line 657
  • #9 pango_itemize
    at pango-context.c line 419
  • #10 pango_layout_check_lines
    at pango-layout.c line 2899
  • #11 pango_layout_get_extents_internal
    at pango-layout.c line 1874
  • #12 pango_layout_get_extents
    at pango-layout.c line 1998
  • #13 gtk_label_size_request
    at gtklabel.c line 1477
  • #14 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 521
  • #15 g_type_class_meta_marshal
    at gclosure.c line 514
  • #16 g_closure_invoke
    at gclosure.c line 437
  • #17 signal_emit_unlocked_R
    at gsignal.c line 2270
  • #18 g_signal_emit_valist
    at gsignal.c line 2099
  • #19 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #20 do_size_request
    at gtksizegroup.c line 491
  • #21 _gtk_size_group_compute_requisition
    at gtksizegroup.c line 678
  • #22 gtk_widget_size_request
    at gtkwidget.c line 2187
  • #23 gtk_hbox_size_request
    at gtkhbox.c line 122
  • #24 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 521
  • #25 g_type_class_meta_marshal
    at gclosure.c line 514
  • #26 g_closure_invoke
    at gclosure.c line 437
  • #27 signal_emit_unlocked_R
    at gsignal.c line 2270
  • #28 g_signal_emit_valist
    at gsignal.c line 2099
  • #29 gtk_signal_emit_by_name
    at gtksignal.c line 374

Comment 1 Alexander Larsson 2002-01-10 00:22:08 UTC
I tracked this down yesterday. It is actually a bug in the Xrender
library shipped with XFree 4.1.0.

In Xrender.c::XRenderQueryFormats() it reads the uninitialized
variable xFormat, and if it's NULL it consider this an error. This was
fixed in:
----------------------------
revision 1.7
date: 2001/10/11 03:26:00;  author: keithp;  state: Exp;  lines: +2 -2
branches:  1.7.2;
Check malloc return for Xrender query reply temp data
----------------------------

But this change is not in a stable XFree86 release yet.

I don't know what to do about this. It's hard to work around as it
depends on what is on the stack. Maybe we can build a fixed version of
libXrender and distribute from gtk.org.

I added a g_error() in the code referencing this bug.
Comment 2 Richard Hult 2002-01-17 21:48:13 UTC
I experienced this as well, but it mysteriously went away when
unsetting LD_BIND_NOW, that vicious-build-scripts used to set until
recently.
Comment 3 Owen Taylor 2002-01-22 21:19:44 UTC
Anything that changes the data on the stack could effect this bug.

4.2.0, now out, has the fix.
Comment 4 Shawn Starr 2002-03-24 01:56:15 UTC
<ShawnX> gnome_segv (pid:31991): ** ERROR **: Failed to match any font. This
          could be due to a broken Xft configuration, or if you run XFree
          4.1.0 due to a bug in libXrender. For more information about this,
          read http://bugzilla.gnome.org/show_bug.cgi?id=68030


<ShawnX> what ?
 SignOff seth: #GNOME (Ping timeout: 600 seconds)
<ShawnX> XFree86 Version 4.2.99.1 / X Window System
<ShawnX> (protocol Version 11, revision 0, vendor release 6600)
<ShawnX> Release Date: xx January 2002
 telemaco [~telemaco@62-36-133-206.dialup.uni2.es] has joined #gnome
<ShawnX> what font is it looking for?
<jamesh> ShawnX: probably sans
<ShawnX> hmm
<jamesh> ShawnX: if your XftConfig file doesn't map it to anything, then you
          have problems
<ShawnX> odd, it works for gnome 1.4.x
Comment 5 Shawn Starr 2002-03-24 02:09:12 UTC
Additional info: im using Xft 1.0.tar.bz2 from keithp's download page.
are there problems with Xft 1.0 vs 1.1 with reguard to this issue?

pango-CVS wont build with Xft 1.1 :/
Comment 6 Shawn Starr 2002-03-25 07:09:10 UTC
Dump from gnome-terminal 2 with gdb:

  • #5 g_log
    at gmessages.c line 583
  • #6 pango_xft_font_map_get_patterns
    at pangoxft-fontmap.c line 654
  • #7 pango_xft_font_map_load_fontset
  • #8 pango_font_map_load_fontset
    at pango-fontmap.c line 128
  • #9 add_engines
    at pango-context.c line 660
  • #10 pango_itemize
    at pango-context.c line 422
  • #11 pango_layout_check_lines
    at pango-layout.c line 2904
  • #12 pango_layout_get_extents_internal

This is NOT fixed.
Comment 7 Shawn Starr 2002-03-25 07:14:59 UTC
from gnome-about 2

5  0x408ffdb6 in g_log (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, 
    format=0x4081ac40 "Failed to match any font. This could be due to
a broken Xft configuration, or if you run XFree 4.1.0 due to a bug in
libXrender. For more information about this, read
http://bugzilla.gnome.org/show_bu"...) at gmessages.c:583
  • #6 pango_xft_font_map_get_patterns
    at pangoxft-fontmap.c line 654
  • #7 pango_xft_font_map_load_fontset
    at pangoxft-fontmap.c line 707
  • #8 pango_font_map_load_fontset
    at pango-fontmap.c line 128
  • #9 add_engines
    at pango-context.c line 660
  • #10 pango_itemize
    at pango-context.c line 422
  • #11 pango_layout_check_lines
    at pango-layout.c line 2904
  • #12 pango_layout_get_extents_internal
    at pango-layout.c line 1879
  • #13 pango_layout_get_extents
    at pango-layout.c line 2004
  • #14 gtk_label_size_request
    at gtklabel.c line 1519
  • #15 g_cclosure_marshal_VOID__BOXED
    at gmarshal.c line 566
  • #16 g_type_class_meta_marshal
    at gclosure.c line 514
  • #17 g_closure_invoke
    at gclosure.c line 437
  • #18 signal_emit_unlocked_R
    at gsignal.c line 2271
  • #19 g_signal_emit_valist
    at gsignal.c line 2100
  • #20 gtk_signal_emit_by_name
    at gtksignal.c line 374
  • #21 do_size_request
    at gtksizegroup.c line 491

Comment 8 Owen Taylor 2002-03-25 13:51:20 UTC
The bug is in Xrender, not Xft.
Comment 9 Luis Villa 2002-05-13 20:06:29 UTC
So, um, how common is this going to be? If it is an xrender bug, and
it is common, we've got to have a workaround- we can't just say 'oh,
sorry, please upgrade X to use GNOME.' That's not going to fly real
far, I wouldn't think...
Comment 10 Owen Taylor 2002-05-13 20:21:24 UTC
People have the choice:

 - Upgrade X
 - Don't use Xft fonts

There really isn't any other way out.. I mean, we could provide
a tarball of a fixed Xrender library, but I think people are
less likely to hose their system if they just upgrade X.
(XFree86-4.2 has been out for over 6 months now.)

Experience indicates that about 1/3 people using XFree86-4.1
will see this crash if they turn on Xft fonts.
Comment 11 Luis Villa 2002-05-15 20:49:48 UTC
Oh, ok, not using xft is an acceptable workaround. Didn't realize that
fixed it (because clearly I failed reading comprehension in elementary
school.) thanks for the feedback, owen.