khaledhosny / luaotfload

Moved to https://github.com/latex3/luaotfload
23 stars 15 forks source link

Infinite loop? #23

Closed ghost closed 13 years ago

ghost commented 13 years ago

Using TeX Live 2010 (luatex 0.60.1 and luaotfload 1.22) on linux x86, the following example fails to compile with lualatex:

\documentclass{amsart}
\usepackage{fontspec}
\begin{document}
\fontspec{DejaVu Sans}
Hello, world!
\end{document}

Here's the last bit of output (with a lot more of the same before it):

luaotfload | Updating the font names database:
luaotfload | Font names database not found, generating new one.
             This can take several minutes; please be patient.
luaotfload | Updating the font names database:
luaotfload | Font names database not found, generating new one.
             This can take several minutes; please be patient.
luaotfload | Updating the font names database:
luaotfload | Font names database not found, generating new one.
             This can take several minutes; please be patient.
luaotfload | Updating the font names database:
! LuaTeX error .../2010/texmf-dist/tex/luatex/lualibs/lualibs-file.lua:75: stac
k overflow.
 
                   \scan_stop: 
l.4 \fontspec{DejaVu Sans}

The same example works as expected with xelatex.

phst commented 13 years ago

This can also be reproduced by removing the texmf-var/luatex-cache directory (if it exists) and then running mkluatexfontdb. LuaTeX version beta-0.65.0-2011010914 (rev 4047), mkluatexfontdb version 1.07. A temporary fix seems to consist in running mkluatexfontdb -f before trying to use LuaLaTeX for the first time (and after installing new fonts), this regenerates the whole database and seems to work fine.

khaledhosny commented 13 years ago

Fix infinite loop

names.load() calls names.update() without an argument if no font database is found, but the later will call the former if invoked without an argument. Now calling names.update() with an empty names database.

closed by 9a6fb44bd9e80bc41d78c58eb6d7bb38cd692672