Closed Bug 201960 Opened 22 years ago Closed 21 years ago

Websites using certain fonts cause Mozilla to crash when Xft is enabled

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
FreeBSD
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 183729

People

(Reporter: marcus, Assigned: blizzard)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386) Gecko/0 Galeon/1.3.3 Build Identifier: Mozilla/5.0 (X11; U; FreeBSD i386) Gecko/0 Galeon/1.3.3 Certain fonts, particularly Helvetica can cause Mozilla to crash when Xft support is enabled. This has been reported by quite a few FreeBSD users now. All requisite ports (Xft, fontconfig, and freetype2) are up-to-date: Xft-2.1 (with all recent patches from XFree86 CVS) fontconfig-2.1.93 freetype2-2.1.4 The fonts in question are all the default XFree86-4.3.0 font packages. While I have not personally seen a crash, I have seen that pages that specify the font face of Helvetica show corrupt fonts. Here is a backtrace from one user that is seeing the crash: (... in mozilla.xft.debug.txt ...) Loading file /usr/X11R6/lib/X11/fonts/75dpi/luBS18-ISO8859-1.pcf.gz/0 Discard file /usr/X11R6/lib/X11/fonts/100dpi/helvR08-ISO8859-1.pcf.gz/0 from cache (no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. XftLockFace (public=0x0) at xftfreetype.c:300 300 face = _XftLockFile (fi->file); (gdb) bt #0 XftLockFace (public=0x0) at xftfreetype.c:300 #1 0x294cf1b8 in nsFontMetricsXft::CacheFontMetrics() () from /usr/X11R6/lib/mozilla/components/libgfx_gtk.so The offending line in nsFontMetricsXft.cpp is lin 645 (in mozilla-1.4a): face = XftLockFace(xftFont); It looks as though mWesternFont->GetXftFont() returns nsnull. A user affected by this problem sent in a patch (attached) that forces Mozilla to ignore non Xft raster fonts which seems to workaround the problem. Reproducible: Sometimes Steps to Reproduce: 1. Go to the example website 2. 3. Actual Results: The browser may or may not crash. In any event, the Helvetica font face will appear cutoff when you try to highlight text. Expected Results: Display the font correctly and not crash.
Attached patch Patch to ignore non-Xft fonts (deleted) — Splinter Review
This patch was submitted by Alexander N. Kabaev <ak03@gte.com> to freebsd-gnome@freebsd.org.
Hmm. GetXftFont() is there specifically to avoid opening the font which adds a good amount of overhead. I need to chew on this code for a bit.
The crash problem is likely to have been fixed by a recent check-in to the trunk. As for excluding non-Xft fonts, there's a fontconfig bug filed for font-type ID without opening fonts. Somehow, fontconfig bugzilla has gone and I couldn't find it....
jshin, see freedesktop.org. I think that the xft-related bugs are there. *** This bug has been marked as a duplicate of 183729 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: