[XeTeX] segfault with xetex

Jonathan Kew jonathan_kew at sil.org
Fri Aug 25 16:26:56 CEST 2006


On 25 Aug 2006, at 2:53 pm, Pablo Rodríguez wrote:

> Jonathan Kew wrote:
>> On 25 Aug 2006, at 1:32 pm, Pablo Rodríguez wrote:
>>> Epigraphica is actually a typo, the installed font is actually
>>> Epigrafica (http://myria.math.aegean.gr/labs/dt/fonts-en.html).  
>>> What I
>>> meant is that my system has no font with this family name.
>>
>> I notice that the naming in those fonts is actually a bit
>> inconsistent; the "ph" form occurs in some of the names within the
>> fonts. Perhaps they decided to change it at some point during
>> development, but didn't fix all occurrences. However, I don't think
>> that necessarily explains the crash you're seeing.
>>
>> Do you get the same crash if you enter a completely "junk" font name,
>> like \setromanfont{MyBadFontName}? How about if you try a simple
>> \font command like  \font\x="SillyNonExistentFontName" at 12pt ? Or
>> does it only happen with the "ph" typo for Epigrafica?
>
> Sorry, the typo in the \setroman font is only mine. As far as I know,
> Epigrafica has correct and consistent font names.

Not quite. Note that one of the faces even has the filename as  
"Epigraphica-Reonta" rather than "Epigrafica-Reonta" as would be  
expected. And there's a similar discrepancy in the PostScript name  
within the font. (But that's not why you're getting a segfault, I  
believe.)

>
> I do get segmentation fault with both \font 
> \x="SillyNonExistentFontName"
> at 12pt and \setromanfont{adjfaldsjfas}.

OK, thanks. In that case, I think the problem is caused by some other  
font that you have on your system, but it may take some trial and  
error to isolate which one.

When you ask xetex to use an installed font, it queries Fontconfig  
with the font name you give, and gathers details of any fonts that  
match; then it picks the right face (we hope!) from among those, if  
there were several style variants, for instance.

But if Fontconfig doesn't find a match for the name, then as a last  
resort (before saying "Font not found"), it will ask for *all*  
available fonts and collect their details. This is because fonts may  
actually have several forms of family and full names, and fontconfig  
doesn't necessarily match on all of them. So xetex tries an  
"exhaustive" (slow) search before finally giving up, if the quick  
approach fails.

This means that if you give a name that isn't actually known to  
Fontconfig, then xetex is going to read information from all your  
installed fonts. And therefore if there's something "broken" about  
*any* of them, it may cause problems.

Of course, xetex shouldn't crash even if you do have a bad font; and  
the "problem" font might not really be wrong at all, it could simply  
be a xetex bug. But until we can isolate which font is triggering the  
problem, it's hard to be sure.

So if you're willing to spend some time tracking this down, I'd  
suggest removing "extra" fonts from your font directories (half at a  
time, perhaps), and re-testing, to try and narrow down the problem.  
What you *should* get with "junk" names like this is a simple "! Font  
not found" error.

Thanks,

JK




More information about the XeTeX mailing list