Subject: Re: bug#30874: 27.0.50; Emacs crashes

From: Robert Pluim <[email-masked]>
Date: Mon, 26 Mar 2018 22:17:50 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Robert Pluim <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Mon, 26 Mar 2018 18:52:17 +0200
>> 
>> > But now that I actually see it, I don't think I understand the reason:
>> > the call to XftTextExtents8 asks the xft font back-end to produce the
>> > extents for an all-ASCII string, so the fact that it may not have
>> > glyphs for some exotic non-ASCII characters couldn't be the culprit.
>> 
>> OK. Is it possible that because we're in synchronous mode that the
>> signal has been received just at an inopportune moment?
>
> I doubt that: the backtrace looks very much like describing the actual
> call into the X libraries.

Yes. Looks like Xft is stuck waiting on a futex somewhere.

>> It doesn't crash if I do eg (insert-char ?a), nor (insert-char #x700).
>
> As expected.  But if you put a breakpoint at line 378 of xftfont.c, do
> you see the same call to XftTextExtents8 with the same arguments in
> the case of 'a'?

No, not for 'a'. I do see it for #x700. XftTextExtents8 does get
called a bunch of times during startup though.

>> > Can you figure out what's going on here, and why?
>> 
>> Looks like I'll have to go poking around in the guts of Xft. Pointers
>> appreciated.
>
> Sorry, I don't know enough about the xftfont back-end to provide any
> pointers.  Maybe someone else here would.

You're in a maze of twisty pointers, all subtly different and
half-opaque. I may end up having to build my own Xft lib.

Robert