On Wed, 2005-11-23 at 23:09 +0100, Felix C. Stegerman wrote:
> Hi,
> 
> Sorry it took so long, but I had a lot of things to do
> (and I kind of forgot about xprint).
> 
> Here's a simple gdb backtrace of my self-compiled xprint.
> 
> I don'd know much about gdb, so please tell me what to do next if you
> need more information.
> 

The backtrace is all I know to get from it myself.  Unfortunately it
doesn't give much hint to what the problem is, but at least it shows you
can reproduce the bug, and it identifies the region of code experiencing
the error, FT_Get_Postscript_Name().

The function is declared in xc/lib/freetype2/freetype/freetype.h and
defined in xc/extras/freetype2/src/base/ftobjs.c (#included in
xc/lib/freetype2/ftbase.c). The function is short, but the definitions
are abstracted away so I don't know why they might be generating your
segfault.  The basic code in ftobjs.c is the same as recent CVS but I
can't see yet if the underlying definitions have already been changed in
CVS to correct the bug.

Aside from going through that freetype code line by line to see if
anything has changed (or needs to change), I might suggest compiling
with freetype switched off.  I think you can do this by editing
xc/config/cf/xprint_host.def around l.134, setting BuildFreetype2Library
to NO instead of YES.  Best to switch the other Freetype #defines off at
the same place to be on the safe side.  However, I haven't tried doing
that myself so please be patient if it does not work as expected, there
might be something here I missed.  If it does work, then you should be
able to print without crashing, although some other fonts would be
substituted in place of any TrueType fonts which will no longer be
accessible.


If you're able to show that the crash stops happening when you switch
off freetype, then we can think about replacing the freetype directories
with the latest versions from cvs. But I'm not sure that will be a
drop-in replacement, so I don't want to rush into that.  You can find
CVS at
http://wiki.x.org/wiki/CvsPage#head-76abb7b7e3a82350915e7616116db5503b89d2ee
(http://cvs.freedesktop.org/xorg/xc/extras/freetype2/)
I'm assuming here of course the error is in the freetype code and has
since been noticed and fixed in cvs.


Another easy thing that's worth trying is to remove all TrueType fonts
from your path.  Run Xprt by hand (as root) using the command line you
get from "ps aux | grep [X]prt", but with the truetype fonts removed
(e.g. /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType). This might help
if the problem occurs when accessing the fonts.  But if the problem is
that your webpage references them even if you don't have them, then I
guess it won't help.

This bug is just the sort of problem that modularised X is supposed to
solve.  Once X is modularised, the freetype developers can keep updating
their freetype library (fixing bugs like this, for instance) without
stunting the use of clients such as Xprint.


I hope we're on the right track.

Drew



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to