Mailinglist Archive: opensuse (4219 mails)

< Previous Next >
[opensuse] wxGTK from SUSE 10.1 makes Emacs 22 segfault
  • From: Stephen Berman <Stephen.Berman@xxxxxxx>
  • Date: Fri, 01 Dec 2006 21:17:23 +0100
  • Message-id: <87hcwf8j70.fsf@xxxxxxxxxxxxxxxxx>
On my SUSE 10.1 I run Emacs 22 built (from CVS/pretest sources) with
GTK support. I installed the wxGTK package from the 10.1 installation
DVD (wxGTK-2.6.2.1-20.i586.rpm) and the next time I started Emacs, it
immediately segfaulted. When I removed wxGTK, Emacs started again as
usual. Before removing wxGTK I ran Emacs under gdb and sent the
backtrace (appended to the end of this post) to the Emacs pretest
mailing list. The developer of the Emacs GTK support code responded
thus:

> This is so deep into Gtk/Pango so I think it is a bug there. The
> last call in Emacs code is in frame 42, which calls
> gtk_widget_size_request.
>
> Then Gtk tries to figure out the sizes of the widgets, apparently it
> tries to find a font in the final frames, (FcPatternBuild), but this
> fails. You could recompile pango with debugging enabled (if not
> already) and see what arguments are passed to strcmp, one is
> probably a NULL pointer. Maybe there is a font it doesn't find.
> Have you tried removing ~/.fonts.cache-1? You can also try to rerun
> fc-cache.

I didn't have the file ~/.fonts.cache-1 either before or after
installing wxGTK. I did rerun fc-cache, but that didn't make a
difference. I would prefer not to rebuild pango if possible; anyway,
Emacs has no problem with pango itself, but with wxGTK. So I then
posted about this to the wxwidgets-devel list, and got a reply from
someone who said he didn't have this problem, adding:

> The point is that none of the wxGTK libaries is involved, so I don't
> see how wxGTK could be the problem. Besides emacs itself, it's all
> plain gtk & pango, nothing related to wxGTK in your coredump.
>
> I didn't check what SuSE exactly put in that wxGTK-2.6.2 package,
> but by your description, it sounds like it might be replacing some
> gtk library that it really shouldn't touch. Or it might be adding
> some configuration data, that's confusing the existing libraries...

This reply prompted me to obtain the SUSE source rpm of wxGTK and
compile it myself. I following these instructions in install.txt:

mkdir buildgtk
cd buildgtk
../configure --with-gtk
make
su <type root password>
make install
ldconfig

It installed under /usr/local and the names of the libraries differed
from those in the SUSE binary rpm, and not all of those libraries were
built with the configuration I made. Then I invoked the GTK build of
Emacs again -- and it segfaulted, with exactly the same backtrace as
before. So it's not just SUSE's binary rpm that's causing problems
for Emacs, it's the source code itself.

But things are even worse: I next ran `make uninstall' (as root),
following install.txt -- but nothing happened. It turns out that the
`uninstall' rule in the Makefile is empty. Is this a change to the
source by SUSE? So then I deleted all the wx* files in /usr/local by
hand, ran ldconfig -- and to my distress GTK Emacs still segfaulted.
That's where I stand right now, unable to start the GTK build of Emacs
(the session I had running before I built wxGTK is not affected, but I
cannot start a new session). So this seems to support the suggestion
that wxGTK altered the pango/GTK configuration. I found all files
newer than the build time of wxGTK but nothing looked obviously
related to me.

So I'm posting here in the hope that someone either knows what the
problem is or can advise me how to track it down within wxGTK, or at
least can tell me how to get GTK Emacs back without having to
reinstall or rebuild pango, as a great number of applications depend
on it and would have to be reinstalled as well. Below I append the
first 42 frames of the gdb backtrace produced by invoking emacs.

Thanks for any help,
Steve Berman


Program received signal SIGSEGV, Segmentation fault.
0xb74b88fa in strcmp () from /lib/libc.so.6
(gdb) bt
#0 0xb74b88fa in strcmp () from /lib/libc.so.6
#1 0xb79c1b45 in FcObjectToPtr () from /usr/lib/libfontconfig.so.1
#2 0xb79c5741 in FcPatternAddWithBinding () from /usr/lib/libfontconfig.so.1
#3 0xb79c5df8 in FcPatternAdd () from /usr/lib/libfontconfig.so.1
#4 0xb79c5e84 in FcPatternBuild () from /usr/lib/libfontconfig.so.1
#5 0xb74150b8 in pango_fc_font_map_get_type ()
from /opt/gnome/lib/libpangoft2-1.0.so.0
#6 0xb7af0830 in pango_font_map_load_fontset ()
from /opt/gnome/lib/libpango-1.0.so.0
#7 0xb7aee84a in pango_context_get_font_description ()
from /opt/gnome/lib/libpango-1.0.so.0
#8 0xb7aeeb92 in pango_itemize_with_base_dir ()
from /opt/gnome/lib/libpango-1.0.so.0
#9 0xb7af6b0b in pango_layout_iter_get_char_extents ()
from /opt/gnome/lib/libpango-1.0.so.0
#10 0xb7af76dc in pango_layout_iter_get_char_extents ()
from /opt/gnome/lib/libpango-1.0.so.0
#11 0xb7cefedd in gtk_label_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#12 0xb7c237c6 in gtk_accel_label_new ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#13 0xb7a66c09 in g_cclosure_marshal_VOID__BOXED ()
from /opt/gnome/lib/libgobject-2.0.so.0
#14 0xb7a590c7 in g_value_set_static_boxed ()
from /opt/gnome/lib/libgobject-2.0.so.0
#15 0xb7a5a9ac in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#16 0xb7a6b6da in g_signal_connect_closure_by_id ()
from /opt/gnome/lib/libgobject-2.0.so.0
#17 0xb7a6cac7 in g_signal_emit_valist ()
from /opt/gnome/lib/libgobject-2.0.so.0
#18 0xb7a6e16e in g_signal_emit_by_name ()
from /opt/gnome/lib/libgobject-2.0.so.0
#19 0xb7d4b0f6 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#20 0xb7d4b347 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#21 0xb7df2c9c in gtk_widget_size_request ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#22 0xb7d0de2f in gtk_menu_item_new_with_label ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#23 0xb7a66c09 in g_cclosure_marshal_VOID__BOXED ()
from /opt/gnome/lib/libgobject-2.0.so.0
#24 0xb7a590c7 in g_value_set_static_boxed ()
from /opt/gnome/lib/libgobject-2.0.so.0
#25 0xb7a5a9ac in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#26 0xb7a6b6da in g_signal_connect_closure_by_id ()
from /opt/gnome/lib/libgobject-2.0.so.0
#27 0xb7a6cac7 in g_signal_emit_valist ()
from /opt/gnome/lib/libgobject-2.0.so.0
#28 0xb7a6e16e in g_signal_emit_by_name ()
from /opt/gnome/lib/libgobject-2.0.so.0
#29 0xb7d4b0f6 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#30 0xb7d4b347 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#31 0xb7df2c9c in gtk_widget_size_request ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#32 0xb7d0b3b7 in gtk_menu_bar_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#33 0xb7a66c09 in g_cclosure_marshal_VOID__BOXED ()
from /opt/gnome/lib/libgobject-2.0.so.0
#34 0xb7a590c7 in g_value_set_static_boxed ()
from /opt/gnome/lib/libgobject-2.0.so.0
#35 0xb7a5a8bd in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#36 0xb7a6b6da in g_signal_connect_closure_by_id ()
from /opt/gnome/lib/libgobject-2.0.so.0
#37 0xb7a6cac7 in g_signal_emit_valist ()
from /opt/gnome/lib/libgobject-2.0.so.0
#38 0xb7a6e16e in g_signal_emit_by_name ()
from /opt/gnome/lib/libgobject-2.0.so.0
#39 0xb7d4b0f6 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#40 0xb7d4b347 in gtk_signal_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#41 0xb7df2c9c in gtk_widget_size_request ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#42 0x080f181c in xg_update_frame_menubar (f=0x8644250)
at /home/steve/emacs-22.0.90/src/gtkutil.c:2924

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages