James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.7k stars 533 forks source link

Compilation freezes #1120

Closed stephbur closed 5 years ago

stephbur commented 5 years ago

I cannot pin down exactly when it happens, but it happens quite frequently (3 times in the past hour). The compilation will never terminate. Instead the status icon (the revolving arrows in the status bar) just keep spinning. Terminating the compilation via the menu in the activity bar does not solve the issue. The kill command is registered by the LaTeX Workshop log, yet nothing happens. Restarting the build process also does not have any effect. The only solution is to reload the window, then it will work again.

The extension itself seems to be still responsive, but no compilation is possible. One hint might be failing of the linter. It also is still active whenever changes to the files are made, but it exits with an error code (1).

This happens on LaTeX workshop 5.20.1, VS Code 1.30.2 on Ubuntu 18.10, latexmk Version 4.59, ChkTeX v1.7.6. Logs and settings below. Let me know if you need more information.

The Latex Compiler log in the output console has "All targets up to date" as its last line.

Excerpt of the LaTeX workshop log:

[09:42:10] Linter for active file started. [09:42:10] Linter for active file running command chktex with arguments -wall,-n22,-n24,-n36,-n46,-n30,-e16,-q,-l /my/custom/path/.chktexrc,-I0,-f%f:%l:%c:%d:%k:%n:%m [09:42:10] Linter for active file failed with exit code 1 and error: [09:42:10] Linter log parsed with 0 messages. [09:42:15] KILL command invoked. [09:42:15] Kill the current process.

Settings

"latex-workshop.view.pdf.viewer": "tab", "latex-workshop.message.update.show": false, "latex-workshop.view.pdf.invert": 0.73, "latex-workshop.latex.autoBuild.onTexChange.enabled": false, "latex-workshop.latex.autoBuild.onSave.enabled": false, "latex-workshop.synctex.afterBuild.enabled": true, "latex-workshop.chktex.enabled": true, "latex-workshop.chktex.args.root": ["-wall", "-n22", "-n30", "-n24", "-n36", "-n46", "-e16", "-q" ], "latex-workshop.chktex.args.active": ["-wall", "-n22", "-n30", "-n24", "-n36", "-n46", "-e16", "-q" ], "files.associations": {"*.tex": "latex" },

nzw0301 commented 5 years ago

Me too...

jlelong commented 5 years ago

I cannot reproduce the problem. Can you post the complete output of the LaTeX compiler?

nzw0301 commented 5 years ago

Sorry for my unclear comment.

Latex workshop log

[18:28:34] Build root file /Users/nzw/Desktop/sample.tex
[18:28:34] Kill previous process.
[18:28:47] File watcher: responding to change in /Users/nzw/Desktop/sample.tex
[18:28:47] Parsing /Users/nzw/Desktop/sample.tex
[18:28:47] Auto-build /Users/nzw/Desktop/sample.tex upon save.
[18:28:47] BUILD command invoked.
[18:28:47] Found root file from active editor: /Users/nzw/Desktop/sample.tex
[18:28:47] Root file remains unchanged from: /Users/nzw/Desktop/sample.tex.
[18:28:47] Building root file: /Users/nzw/Desktop/sample.tex
[18:28:47] Build root file /Users/nzw/Desktop/sample.tex
[18:28:47] Kill previous process.

LaTeX Compiler log

Latexmk: This is Latexmk, John Collins, 25 October 2018, version: 4.61.
Latexmk: All targets (sample.pdf) are up-to-date
jlelong commented 5 years ago

@nzw0301 I cannot see anything wrong in your logs, I would rather think that your problem is related to #1114. Can you try the fix and let me know how it goes?

stephbur commented 5 years ago

I have posted my compiler log to pastebin. But I don't think there's anything interesting in it.

Also, I think it is not related to the issue referred to by @jlelong as a simple reloading of the window already solves the issue.

jlelong commented 5 years ago

The only strange line in your log is

Couldn't find aux file '/labjournal.aux'

Just to be sure, can you apply the fix in #1114 anyway?

You wrote

The compilation will never terminate. Instead the status icon (the revolving arrows in the status bar) just keep spinning.

Can you post the complete LaTeX compiler and extension logs the next time it happens?

It is pretty hard to figure out what is going wrong as I cannot reproduce it.

nzw0301 commented 5 years ago

@jlelong Thank you for your comment. I solved my problem by applying #1114. I am very grateful to you.

jlelong commented 5 years ago

@stephbur Any update on the problem? Have you tried the fix in #1114 ?

stephbur commented 5 years ago

I applied the fix and it hasn't happened again since. But I only did 2 more compilations. This is on my work computer, so I can only investigate further starting Monday.