Report a clear error when a font fallback crashes lualatex#14560
Open
cderv wants to merge 2 commits into
Open
Conversation
On recent TeX Live (luaotfload v3.29), setting a font fallback (mainfontfallback/monofontfallback/...) crashes LuaLaTeX before a PDF is produced: luaotfload's fallback resolver dereferences a nil font. Quarto only showed a generic "compilation failed" with no usable signal, because the crash is a Lua runtime error with no standard "! ...Here is how much" block for the log parser to key off. Detect the crash signature in findLatexError and return a message that names the fallback options, explains it is a known upstream luaotfload bug on this TeX Live, and points to the single-font workaround. Upstream report: latex3/luaotfload#331 See #14553.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a document sets a font fallback (
mainfontfallback,monofontfallback, ...) and renders to PDF with lualatex on recent TeX Live (luaotfload v3.29), lualatex crashes before producing a PDF and Quarto reports only a genericcompilation failed- error.Root Cause
luaotfload's fallback resolver appends an internal
;-fallbackfeature to each fallback entry and resolves it withdefine_font, which returnsnilon this version;luaotfload-fallback.luathen dereferences thenil. The crash is a Lua runtime error with no! ...Here is how muchblock, sofindLatexErrorinsrc/command/render/latexmk/parse-error.tsextracts nothing and the user is left with a generic failure and no signal.Fix
Detect the crash signature in
findLatexErrorand return an actionable message: it names the fallback options, explains it is a known upstream luaotfload bug on this TeX Live, and points to the single-font workaround (e.g.monofont: JuliaMono). Upstream report: latex3/luaotfload#331This is a diagnostic only — the underlying crash is upstream. The single-font workaround renders correctly today.
Test Plan
monofont+monofontfallbackon lualatex (TeX Live 2026) — the error names the fallback options and links the upstream issue, instead of a generic failuretests/unit/latexmk/parse-error.test.tscovers the crash-log signatureRelated to #14553