1

When I updated my MiKTeX installation (on Windows 7) today, LuaLaTeX went broken. When I try this minimal example it compiles with PdfLatex and XeLaTeX but not LuaLaTeX:

\documentclass[12pt]{article}
\begin{document}
Hello world!
\end{document}

I get this error message:

luaotfload error: "bad argument #3 to 'string.format' (number has no integer representation)" Lua interpreter stack traceback: ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:155: in function <...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:152> [C]: in function 'string.format' [C]: in function 'xpcall' ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:170: in upvalue 'basic_logger' ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:276: in function 'logreport' ...MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-database.lua:532: in upvalue 'load_names' ...MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-database.lua:625: in upvalue 'lookup_filename' ...MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-database.lua:684: in field 'lookup_font_file' ...iKTeX 2.9/tex/luatex/luaotfload/luaotfload-resolvers.lua:77: in function <...iKTeX 2.9/tex/luatex/luaotfload/luaotfload-resolvers.lua:76> (...tail calls...) ...iKTeX 2.9/tex/luatex/luaotfload/luaotfload-resolvers.lua:247: in local 'r' ...KTeX 2.9/tex/luatex/luaotfload/fontloader-2019-02-14.lua:29709: in field 'resolve' ...KTeX 2.9/tex/luatex/luaotfload/fontloader-2019-02-14.lua:29899: in upvalue 'read' .../MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-loaders.lua:135: in function <.../MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-loaders.lua:134> (...tail calls...)

If I understand it correctly, the main error message is about a syntax error in a luaotfload script? And I guess that it tries to print another error message about some missing font or something?

From fontspec throwing error with lualatex - broken? i tried the command

luaotfload-tool --update

which gave me a similar error message:

luaotfload error: "bad argument #3 to 'string.format' (number has no integer rep resentation)" Lua interpreter stack traceback: ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:155: in func tion <...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:152> [C]: in function 'string.format' [C]: in function 'xpcall' ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:170: in upva lue 'basic_logger' ...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:276: in upva lue 'logreport' ...MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-database.lua:532: in upva lue 'load_names' ...MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-database.lua:3332: in fie ld 'update' ...ograms\MiKTeX 2.9\scripts/luaotfload\luaotfload-tool.lua:806: in loca l 'action' ...ograms\MiKTeX 2.9\scripts/luaotfload\luaotfload-tool.lua:1622: in fun ction <...ograms\MiKTeX 2.9\scripts/luaotfload\luaotfload-tool.lua:1606> (...tail calls...)

...rams/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload-log.lua:232: bad argument #3 to 'stringformat' (number has no integer representation)

A similar problem (fontspec throwing error with lualatex - broken?) was related to a missing lmodern font package. But I cannot find that package in MiKTeX Console. I have installed similar packages (lm, lm-math, variablelm) but that does not help.

I still guess that the problem is related to the Latin Modern font somehow, because in directory C:\Users...\AppData\Local\MiKTeX\2.9\luatex-cache\generic\fonts\otl, where the font cache is, the font listing goes alphabetically and stops at lmsans10-regular.luc.

Any ideas?

Edit:

If I continue the compilation process by hitting Enter, LuaLaTeX gives a new error message, which maybe can spot the actual problem:

Font \TU/lmr/m/n/12=[lmroman12-regular]:+tlig; at 12pt not loadable: metric data not found or bad.

The font file lmroman12-regular.otf does exist, and looks fine when I double-click on it in Windows Explorer.

closed as off-topic by Mensch, barbara beeton, Zarko, Phelype Oleinik, Raaja Sep 16 at 3:55

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Standard question with miktex: did you update ad both user and admin using the miktex console? – daleif May 1 at 12:22
  • 1
    Your error shows pathes related to ...ograms\MiKTeX 2.9\scripts. This doesn't sound like a single user installation. If you run a small document with luatex (not lualatex) which contains \directlua{tex.print(lua.version)}\bye what do get as output? – Ulrike Fischer May 1 at 12:39
  • 1
    Ok, try if it works if you delete (or move out of the tree) the content of luatex-cache\generic\fonts (it can then take some time!) – Ulrike Fischer May 1 at 13:00
  • 2
    @Ulrike Fischer: Thanks! Just erasing the fonts directory didn't help, but erasing the whole luatex-cache did work, for this problem. (There seems to be more problems too, but that will be another topic...) – UML May 1 at 13:14
  • 4
    I'm voting to close this question as off-topic because it was solved in comments. – Mensch Sep 16 at 0:07

Browse other questions tagged or ask your own question.