http://www.theregister.com/ will cause Firefox to crash after upgrading Freetype to 2.1.9. Downgrading to 2.1.7. resolves issue. Reproducible: Always Steps to Reproduce: 1.emerge =freetype-2.1.9 2.open http://www.theregister.com/ with Firefox 3.Application crashes Actual Results: Application crashes Expected Results: Properly display page. xorg nvidia
This now appears to be isolated to web pages requesting the Helvetica font. When Mozilla/Firefox attempts to render Helvetica with Freetype 2.1.9 it crashes.
Me too, with Epiphany.
If I revert this patch: http://cvs.freetype.org/cgi-bin/viewcvs.cgi/freetype2/src/pcf/pcfdrivr.c.diff?r1=1.7&r2=1.8 I seem to end up with a stable freetype. However, i'm unable to properly judge the side effects of backing out this patch.
This is not a mozilla problem, but a problem with xorg-x11 xft in combination with freetype >2.1.7 (which is in p.mask). We are looking into this problem.
Surely its not a mozilla specific problem, pcf fonts are definetly involved though: I'm too inexperienced with this to see why reverting the patch above makes the stuff stable, the backtrace doesn't seem to go to libfreetype as yet, but then, i can be mistaken because i hardly know what to look at. louise ~ # gdb gnome-font-viewer GNU gdb 6.1.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run file:///usr/share/fonts/75dpi/courB12-ISO8859-1.pcf.gz Starting program: /usr/bin/gnome-font-viewer file:///usr/share/fonts/75dpi/courB12-ISO8859-1.pcf.gz [Thread debugging using libthread_db enabled] [New Thread 1088303808 (LWP 29894)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1088303808 (LWP 29894)] 0x40ab1263 in strlen () from /lib/libc.so.6 (gdb) bt #0 0x40ab1263 in strlen () from /lib/libc.so.6 #1 0x40037a00 in _XftReleaseFile (f=0x811e498) at xftfreetype.c:292 #2 0x40038db7 in XftFontOpenPattern (dpy=0x805b980, pattern=0x0) at xftfreetype.c:1020 #3 0x0804b169 in main (argc=2, argv=0xbffff4d4) at font-view.c:68
What happens if you recompile and restart X after upgrading freetype?
Still segfaults gnome font viewer the very same way.
The problem lies solely in Xft Xft CVS from xlibs.freedesktop.org fixes it. see also the last bit on the freetype devel maillist (their archives were broken until recently)
The problem does not lie solely with Xft, as foser and I have discussed outside of this bug. The external Xft that fixes things is _exactly_ the same code as the Xft within 6.7.0 release. Something else is happening. What I can confirm is that neither the freetype nor the fontconfig included within the monolithic X (xorg-x11 in this case) are built. It seems possible, however, that the Xft within the monolithic X (wrongly) uses freetype/fontconfig includes from within the build rather than the system ones.
The above is assuming this is the same bug foser and I discussed, which may not be the case. But please diff *.[ch] files in xc/lib/Xft/ with your CVS checkout of Xft.
I can drop external libXft all the way down to 2.1.3 and up to CVS HEAD and see no segfaults. the .h files between xorg Xft and libXft 2.1.6 do not differ (cept a cvs comment in Xft.h) the .c files do not differ, except for xftfreetype.c. Difference are not huge, and more significantly, I can use the xorg version of this file in the external lib install and /not/ get segfaults. Visa versa, using xftfreetpe.c from the 2.1.6 release doesn't fix segfault when build in the xorg tree. I did some semi senseless hacking. I took 2.1.6 libXft release and build it. using the gcc command that links up libXft.so.2.1.2 one by one i replaced the .o files with the .o files from a build-by-portage xorg/Xft tree. segfaults started after it started using the xftfreetype.o build by xorg tree. Appears to me /something/ in the building of xftfreetype.o by the xorg tree introduces an error.
Might be worth diffing the generated Makefiles and looking for something significant. Nice work so far. Did you keep substituting in the rest of the files after finding that xftfreetype.o broke it? It sounds a little like once you hit one breakage, you stopped. There could be many.
Also, from xorg@freedesktop.org list: > Appearantly there was a problem between 2.1.6 and 2.1.7 and there > are indications that there also is a problem between 2.1.7 and 2.1.8. Anything built with 2.1.6 would segfault when started with 2.1.7, because the ABI was silently changed.
It might be worth trying xorg CVS. A bunch of stuff related to its semi-broken freetype has been committed in the last couple of days. You can probably leave the host.def blank -- I think the defaults are about what we want. The xc/BUILD document details what you need, but basically 'make World' and 'make install DESTDIR=/path/to/some/empty/location.' By the way, relative paths don't work for the install -- gotta be absolute.
RE 12: Replaced one by one using more and more of the xorg .o files. didn't try individually. Diffing the makefiles is next to useless. The xorg ones are made by Imake, the seperate tree by autoconf; sizes differ massively. I did keep logs of the build in only the Xft subdir, if you have interest in them i can post them tonight.
Note: I also generated the full preprocessed version of xftfreetype.c in both trees manually. Sizes differ marginally between the 2 trees at ~310K, but when diffed there is huge differences. Some .h's seem to be taken from the internal tree, where the standalone takes them from system, but this may be legitimate still... need to investigate more. Still feel there may be a buildsystem bug (why oh why does Keith want to autotool this stuff so much ;-) )
I've got build logs too. What I don't have right now is time to analyze them closely. So that's what would be excellent for you to do. If you cared to attach a diff of the preprocessed files, that may also be helpful. With accompanying analysis, of course. =)
https://freedesktop.org/bugzilla/show_bug.cgi?id=1047
Rebuild Xorg 6.7.0-r2 but added the patch to xftfreetype.c from xlibs cvs. Doesn't fix segfaulting for me. Installing stand alone libXft on top still does.
Sorry, bad link. https://freedesktop.org/bugzilla/show_bug.cgi?id=1062
Created attachment 37427 [details, diff] Fix to the problem =) Applied this patch in local overlay for xorg-x11 and no longer get the infamous crashers ;-)
Please reopen if this isn't fixed in 6.8.
This should be fixed in all current X versions.
Fixed.