GNOME Bugzilla – Bug 107285
gnome-terminal 2.2.1 crashes on startup
Last modified: 2004-12-22 21:47:04 UTC
From: Dimitar Haralanov <mitko@tahoenetworks.com> To: X-Mailer: bug-buddy 2.2.102 (This bug report was generated by Bug Buddy 2.2.102) Description of Problem: gnome-terminal 2.2.1 crashes on startup because it can not find the Sans font. I know that this appears to be a duplicate of bug 105861 but I believe it is not since all other GNOME 2.2 applications can actually use the Sans font that Xft serves. Furthermore, this happens to any of the fonts that I select through the font selector not just Sans. Steps to reproduce the problem: 1. Start gnome-terminal 2.2.1 Actual Results: The console gets this output: ** (gnome-terminal:22337): WARNING **: Failed to load Xft font pattern "Tahoma-10:slant=0:weight=100", falling back to default font. The terminal window appears but shortly after (before any of the widgets within the window have been drawn), the crash dialog appears Expected Results: I am expecting that the gnome-terminal would work as designed How often does this happen? every time. Additional Information: I read the bug report and comments for 105861 and then made sure that the Sans font is acutally usable. I have tried using the Sans font for the Nautilus desktop, for gkrellm, and for the window font. In all the cases, the fonts have been served correctly and the applications worked. Debugging Information: Backtrace was generated from './gnome-terminal' [New Thread 1024 (LWP 22337)] 0x40bec219 in __wait4 () at __wait4:-1 in __wait4
+ Trace 34397
Thread 1 (Thread 1024 (LWP 22337))
Pretty sure this is an Xft bug. Maybe you are mixing Xft1 and Xft2, or using Xft1 instead of Xft2. 7.3 only comes with Xft1.
Looks like bug 102166--the stack traces seem to match. Are they duplicates?
I know I have Xft2 installed because I downloaded, compiled, and installed it from the Gnome ftp site when I was working on getting Gnome 2.2 up. It could be that gnome-terminal has mixed the two up and compiled using Xft1. In that case, I am not sure how to make it use the correct one, as there is no configure option. I do not think that uninstalling Xft1 is the correct way since other old-Gnome apps probably depend on it. Any suggestions, idea are welcome?
Adding myself to CC, seeing the same problems on Debian Woody PPC, fcpackage 2.1 from tarball, GNOME from CVS HEAD. Suspecting some kind of bad Xft1/Xft2 interaction, I have no clue what is wrong, after fooling around for several hours. Fell back on gnome-term2 + zvt, because that combination does work. Not sure if this is a vte or gnome-terminal issue. I would say gnome-terminal, because the vte test application works (but that might be a totally stupid argument).
I had the same problem and noticed that gnome-terminal was linked against libXft1 which I happen to have installed in a separate prefix from libXft2. I changed the TERM_LIBS order in configure.in so that gnome libs (and so the -L($gnome_prefix)/lib flag where Xft2 is likely to appear when gnome is installed with a build script) appears before any X lib. I have no idea at all if I have been lucky or if this is a real fix, but recompiling gnome-terminal with the coming patch attached fixed these crashes.
Created attachment 14776 [details] [review] patch for configure.in
I also wanted to point out bugs with similar symptoms: #105408 #105861 (which is already closed) #107285 (I was getting exactly the same error message)
Making similar tweak to vte's .pc file, throwing back to gnome-terminal.
Adding keywords and upping pri.
It bears mentioning that this is a pathological case stemming from having multiple development versions of libXft installed, and linking with more than one version of libXft simultaneously.
This is a bug in Xft's parallel install in the first instance (Xft headers should have been in versioned subdir, and library -lXft should have been renamed, http://ometer.com/parallel.html), but it's too late to change that. Given that issue exists, it is a problem with your distribution for using Xft1, basically. The above configure.in patch randomly happens to fix it but is fragile and doesn't really fix it in any reliable way.
(The workaround is to kill the libXft.so -> libXft.so.1 link and uninstall Xft 1 header files)
There may be a problem on my side, but gnome-terminal+vte is the only appto have issues with that. I compile gnome2 using jhbuild on a debian, and everything works flawlessly apart from gnome-terminal. If that would have happened on all gnome2 apps, I would have blamed my distro, but in that case, I don't think it is the only one which should be blamed
The problem so far i found is as Havoc says the fact that almost every distro out there installs libXft1 by default if you install the XFree86-libs and the devel package. The fact is that the library Xft1 included by default with the packages i mentioned before conflicts but this is a library name actually. So, the problem is that usually the Xft1 libraries are in /usr/X11R6/lib and theres a link there (libXft.so) instead of libXft1.so, and when you build Xft2 from the fcpackage in installs it under your prefix, in my very own case i made my gnome-2 and new libraries prefixes on /opt/local, so the new Xft library from fcpackage was installed on /opt/local/lib and the old one the one that came with XFree86 on my distro (Mandrake 8.2) its in /usr/X11R6/lib, so i had the same problem as you did, but something that many people forget often is to READ THE OUTPUT when you do the "make" stuff. And ehwn i was compiling gnome-terminal again it complained and throwed something like: "libXft.so.1.1 may conflict with /opt/local/lib/libXft.so.2..." And yeah, the first time i forgot to read it, so i thought it was a problem, but not only that gnome-terminal program gave me problems, ggv and some other ones did it too, and i decided to do it again. When i started to compile it again, the first thing i did was NOT TO COMPILE Xft1 FROM FCPACKAGE, i did only compile the new Xft and the fontconfig program with a prefix under /opt/local, cause i have alreadye Xft1 with the XFree86-libs package on my distro so my first recomendation is to do that: -Only install the new Xft from the fcpackage, not the Xrender and Xft1. (of course only if you have XFree86-libs available wich you may normally got installed) Then, i did something tricky but it worked, i made a dir (wherever you want) and moved the libXft.so (wich links to libXft.so.1, wich then goes to libXft.so.1.1) and so on to that new directory, just to have them on backup, then there was no Xft1 libs under anywhere but i didnt have the need to uninstall XFree (i did it actually and it was a mess so im warning you) and then re-reun the ./configure - make - checkinstall (very useful to make rpm's/tg'z/deb's) and then the surprise came, the problem was the Xft1 as it was on /usr/X11R6/lib the configure search for the libraries first there than in /opt or wherever else, so i just moved them from there, compiled gnome-termial, moved back the Xft1 libraries to where they belong (after compiling gnome-terminal) and there was my gnome-terminal without crashing. I know im not a hacker or something else but this truly works i think, in any kind of distro like Red Hat and its "clones" cause i never had a problem compiling on slackware 8.1 and i never had used debian so i cant tell you but it will work. Sorry for the bad english as im a proudly Mexican guy. ;) P.S. For god's sake make yourself packages of your DE cause at least gnome 2.2 its a really headache to make it work, so as long as you got it running with all the features you want make a package of each of them so you dont have to hazzle with making all packages again if something happens to your system. (i know very lame one, but many people use to forget this...). Visor7(at)unixmexico.org