Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to create lualatex.fmt when compiled through IDE, but problem fixed after compiling through PowerShell #3910

Open
kalekje opened this issue Feb 17, 2025 · 5 comments
Labels
bug Deficiencies in TeXiFy behaviour.

Comments

@kalekje
Copy link

kalekje commented Feb 17, 2025

I am encountering a bug which can be reproduced using two separate computers with a MiKTeX installation. The installation versions used are:

LuaHBTeX, Version 1.18.1 (MiKTeX 24.4)

TeXify: 10.1

The error is produced with the following steps.

  1. Compile a .tex file with IDE (TeXify IDEA) using the CLI configuration shown below, it works successfully
  2. Open MiKTeX Console and check for updates, or refresh FNDB
  3. Try to compile with IDE again using same CLI config, but the error occurs as shown below
  4. Try to compile through Windows Powershell Terminal usingthe same CLI config, it works successfully
  5. Compile with IDE using same CLI config, it works fine again, until I use MiKTeX to check for updates or refresh FNDB

Based on the log file, the problem seems to be the failure of lualatex.fmt being created. Perhaps this is due to the start path of the compile command/process? I did not have this problem ~ 2 years ago.

The CLI:

lualatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf -output-directory=C:/Users/Kale/Projects/LaTeXpackages/penlightplus/out --luadebug penlightplus.tex

The error:

Sorry, but lualatex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Kale\AppData\Local\MiKTeX\miktex\log\lualatex.log

Process finished with exit code 1

The log:

lualatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf -output-directory=C:/Users/Kale/Projects/LaTeXpackages/penlightplus/out --luadebug penlightplus.tex
2025-02-17 12:37:21,894-0600 INFO  lualatex - running on Windows 10.0.26100
2025-02-17 12:37:21,920-0600 INFO  lualatex - going to create file: lualatex.fmt
2025-02-17 12:37:21,920-0600 INFO  lualatex.core - start process: miktex --enable-installer formats build lualatex --engine luahbtex
2025-02-17 12:37:30,654-0600 ERROR lualatex - C:\Users\Kale\AppData\Local\Programs\MiKTeX\miktex\bin\x64\miktex.exe did not succeed; exitCode: 1
2025-02-17 12:37:30,654-0600 ERROR lualatex - output:
2025-02-17 12:37:30,655-0600 ERROR lualatex - Building format 'lualatex' with engine 'luahbtex'...

Sorry, but: Windows API error 2: The system cannot find the file specified.

2025-02-17 12:37:30,655-0600 FATAL lualatex.core - The memory dump file could not be found.
2025-02-17 12:37:30,655-0600 FATAL lualatex.core - Data: fileName="lualatex.fmt"
2025-02-17 12:37:30,655-0600 FATAL lualatex.core - Source: Programs\TeXAndFriends\luatex\miktex\miktex.cpp:74
2025-02-17 12:37:30,655-0600 FATAL lualatex - The memory dump file could not be found.
2025-02-17 12:37:30,655-0600 FATAL lualatex - Info: fileName="lualatex.fmt"
2025-02-17 12:37:30,655-0600 FATAL lualatex - Source: Programs\TeXAndFriends\luatex\miktex\miktex.cpp
2025-02-17 12:37:30,655-0600 FATAL lualatex - Line: 74
2025-02-17 12:37:30,666-0600 INFO  lualatex - this process (32280) finishes with exit code 1
2025-02-17 12:39:12,802-0600 INFO  lualatex - this process (29940) started by pycharm64 in directory C:\WINDOWS\system32 with command line: lualatex --help
2025-02-17 12:39:12,803-0600 INFO  lualatex - running on Windows 10.0.26100
2025-02-17 12:39:12,806-0600 INFO  lualatex - this process (29940) finishes with exit code 0

@kalekje kalekje added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels Feb 17, 2025
@PHPirates
Copy link
Collaborator

Thanks for reporting this. Interestingly, I can reproduce the issue (on Linux), but for me lualatex crashes the first time and works the second time, no matter if I use the terminal or the IDE both times.
Could you check if that is also the case for you?
If yes, the issue might not be caused directly by TeXiFy.

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Feb 21, 2025
@kalekje
Copy link
Author

kalekje commented Feb 21, 2025

I get continued fails if I keep compiling from the IDE.

I suspect it might have to do with where the command/process is run from?

I did submit an issue to miktek and they could not reproduce the issue

@PHPirates
Copy link
Collaborator

I get continued fails if I keep compiling from the IDE.

Also when only using the terminal?

I suspect it might have to do with where the command/process is run from?

Well, the issue is reproducible for both of us for both IDE and terminal, so if anything this suggests that it does not have anything to do with from where the command is run.

I did submit an issue to miktek and they could not reproduce the issue

I actually agree with comment MiKTeX/miktex#1595 (comment) , provide all the miktex log files (see Diagnose tab in miktex console) and don't mention the IDE (since it is reproducible from the terminal), then try to submit the issue again.

@kalekje
Copy link
Author

kalekje commented Feb 21, 2025

Thanks for checking. I re-tested it, and it appears that multiple compiles fix the issue (I could have sworn that in a prior version or on my home computer, I had to use the command line to get things working again).

So the issue then is after the update, I have to compile once to a failure, then compile again.

@PHPirates
Copy link
Collaborator

PHPirates commented Feb 21, 2025

That's good, then at least I am looking at the same issue. I'll search a bit to see if I can find a solution

I can reproduce with just this command: lualatex -output-directory=out small2e but the issue does not occur with pdflatex or when not using the output directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants