[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ft-devel] Re: xorg crashes with freetype2-2.1.10
From: |
Turner, David |
Subject: |
RE: [ft-devel] Re: xorg crashes with freetype2-2.1.10 |
Date: |
Wed, 3 Aug 2005 18:35:35 +0200 |
Hello everyone,
I'm back from vacation and have some hints regarding this infamous
crash.
- First of all, the reason why some pointers have been set to NULL in
the latest package is really that:
* the functions were _not_ used by the rest of the library,
nor exposed through a public API. And I couldn't reasonnably
guess what the X.org code was doing
* the functions are completely removed in the heap-optimized
version of the library.
If you want to correct it safely, line 370 of 'src/sfnt/sfdriver.c'
should read instead:
#ifdef FT_OPTIMIZE_MEMORY
0 /* tt_find_sbit_image */,
0 /* tt_load_sbit_metrics */,
#else
tt_find_sbit_image,
tt_load_sbit_metrics,
#endif
- The real problem is that the X.org code relies on features that
are internal to the library. This is ok as long as its sources
are embedded within the X Server (or X Font Server), but breaks
when trying to rely on the library installed on the system.
There aren't that many solutions, but they do exist:
A/ Forget about the "optimization", load the glyphs twice
and be done with it.
B/ Keep a copy of the FreeType sources within X.org, and never
use the system-installed version of the library.
C/ Ask for a dedicated public API for the problem, which will
appear in a later release of the library (e.g. 2.2.0). Do
some twisted magic at compile-time:
- if the version of FreeType headers used at compile time
are < 2.2.0, forget about the optimization
This is the only way to generate correct code that will never
break in the future.
By the way, I don't think I'll be able to produce a patch for
X.org in the coming weeks !!
Hope this helps,
- David Turner
- The FreeType Project (www.freetype.org)
> -----Message d'origine-----
> De : address@hidden
> [mailto:address@hidden
> la part de
> Werner LEMBERG
> Envoyé : dimanche 24 juillet 2005 21:44
> À : address@hidden
> Cc : address@hidden; address@hidden;
> address@hidden
> Objet : Re: [ft-devel] Re: xorg crashes with freetype2-2.1.10
>
>
>
> > > > My test of the freetype module showed that I could cause a crash
> > > > by loading any -iso10646-1 ttf font I tried; but using an eight
> > > > bit encoding never caused a crash. I didn't try any other
> > > > sixteen bit encodings (such as legacy CJK encodings) and I
> > > > didn't try otf or type1 fonts in that test.
> > >
> > > Thanks for all your tests, but to really find out the problem we
> > > need backtraces, which I was told is not an easy thing with X.
> >
> > We have one in my original report. It has full debugging symbols,
> > and shows exactly where in xorg the symbol is being dereferenced.
>
> There are two problems. The one with your backtrace shows that this
> particular xorg version uses an internal function of FreeType which
> has changed. I think David T. can answer this better (after returning
> from his vacation) since he has already written some patches for main
> applications to avoid FreeType internals.
>
> The other problem (reported by James) could be a different bug,
> probably in the cmap code of FreeType, and for his particular problem
> I would like to see a backtrace.
>
>
> Werner
>
>
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
>
- RE: [ft-devel] Re: xorg crashes with freetype2-2.1.10,
Turner, David <=