On Wed, Oct 20, 2021 at 05:23:10PM +0300, Eugene Berdnikov wrote:
>  Xpdf 3.04+git20211001-1 crashes on bookworm/sid (amd64).
....
> #0  ComputeMetrics (rend=0x55f686580c40, text=text@entry=0x55f686580e74, 
> byte_count=7, type=<optimized out>, 
>     which_seg=which_seg@entry=3, width=width@entry=0x7fffdb64203c, 
> height=0x7fffdb64203e, ascent=0x0, descent=0x0, 
>     utf8=0 '\000') at XmString.c:6343

Thanks for the traceback! The change that has almost certainly caused
this is that xpdf now uses Motif's Xft font rendering support (in the
interests of being able to render characters beyond ASCII properly in
the GUI).

The crash is happening inside the Motif library when xpdf tries to
create its very first text widget, on this line of code:

        asc = _XmRendXftFont(rend)->ascent;

The font pointer in question was set elsewhere in Motif from the results
of an XftFontOpenPattern call, which returns NULL if no font was
matched. However, the font it's asking for is very generic (Serif bold
20) so I'd expect it to match something... which suggests this is
probably something odd about Motif rather than xpdf specifically.

I assume you have some fonts installed that Xft/fontconfig knows about
(running "fc-list" prints something)?

It would be worth setting a breakpoint on XftFontOpenPattern and seeing
if it's getting there at all -- strace might also tell you whether it's
finding the fontconfig cache and any font files.

Thanks,

-- 
Adam Sampson <a...@offog.org>                         <http://offog.org/>

Reply via email to