Latex-workshop: LaTeX Workshop freezes

Created on 8 Nov 2019  路  18Comments  路  Source: James-Yu/LaTeX-Workshop

Disable all the other extensions except for LaTeX Workshop, and check that you still see this issue. [Required]

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.
Done

If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.

Trouble with Latex Workshop

Describe the bug [Required]
After some time latex workshop fails to work: the latex workshop menu on the left side of the screen is not loading anymore, the document can be compiled anymore, the enter key for a new line is not working anymore (strg + enter and typing does). Synctex also stops working

Simply restarting VSC resets the error. Using multiple windows, only the frozen one is affected, the other vsc windows work fine.

I completly reinstalled windows on my laptop. I tried using the default settings(on some of the logs i might have tried different settings, but the problem occured nevertheless), disabled all other extensions.

The problem is occuriung on every document im working on, even the most basic latex documents.

To Reproduce
Im am unable to reproduce the the error with a clear reciepe, but saving, formatting, synctex and compiling with only seconds between seem to higher the risk oft latex workshop freezing.

Expected behavior
Latex Workshop should not freeze.

Logs [Required]
I was unable to identify a common in the logs.

log_error1.txt
log_error2.txt
log_error3.txt
log_error4.txt
log_error5.txt

Screenshots
n.a.

Desktop [Required]:

  • Windows 10: Version 10.0.18362 Build 18362
  • VS Code version: 1.40.0
  • Extension version: 8.3.1

Are you using LaTeX Workshop with VS Code Remote?

No

Additional context
This is my first reporting a possible bug. If i can give more information, ill provide them.

bug

All 18 comments

From your logs, we can see that the extension tries to parse source files provided by tikz and pgf because

  • they are listed as dependencies in the .fls file produced by latexmk (this is fine)
  • they have a .tex extension (this is what needs to be fixed).

I will have a look at it.

@chrishaxalot Can you try to add **/*.code.tex to latex-workshop.latex.watch.files.ignoreand let me know if you still experiment freezing?

@chrishaxalot Can you try to add **/*.code.tex to latex-workshop.latex.watch.files.ignoreand let me know if you still experiment freezing?

I had the same problem as @chrishaxalot . Then I followed the instructions **/*.code.tex in latex-workshop.latex.watch.files.ignore which didn't fix the problem. A working solution for me is to use version 8.2.0.

First, thank you @jlelong for your help. Adding **/*.code.texin latex-workshop.latex.watch.files.ignore sadly didnt help but downgrading to 8.2.0 did. As is saw in the version menu, 8.3.0 was released one week, this is the time my troubles started.

I attached a log from a file that doesnt contain tikz or pgf code but where the extensions stoped working also.
log.txt

I hope this information helps you!

I think that @tamuratak has probably identified the cause of this issue 82dabc5: watching a file inside a OneDrive folder seems to be the culprit.

In any case, .code.tex files are provided by the TeX distribution itself and should not be watched.

Even without OneDrive, it would lead to high CPU utilization if usePolling is true. What I am trying to say in the markdownDescription is

  • When usePolling: true, the implementation being used in Node.js is not efficient.
  • usePolling: true is necessary if TeX files are on network drives or OneDrive.

Since lots of users seem to use OneDrive and network drives, I think we need to set usePolling: true by default.

We can refer to standard locations of MiKTeX files.

Since lots of users seem to use OneDrive and network drives, I think we need to set usePolling: true by default.

I am not sure to agree with this as it will induce a higher than requested CPU usage for all other users. I would rather set usePolling: true as the default and add 1. make it clear in the release notes 2. a FAQ entry.

We can refer to standard locations of MiKTeX files.

I agree that we should at least add
C:\Program Files\MiKTeX **/* /usr/local/share/miktex-texmf/**/* /Library/Application Support/MiKTeX/texmfs/install/**/*
to latex-workshop.latex.watch.files.ignore and the equivalent for TeXLive . Only TeX developers might be interested in watching .sty files or files inside their TeX distributions and they probably are a minority of users.

New FAQ entry. Feel free to update.

The new variables are described here.

I am not sure what you try to match this pattern. This pattern does not match C:\Program Files\MiKTeX 2.9 and others on Windows. In subdirectories of C:\Program Files\MiKTeX 2.9, the directory,texmf, would not exist.

https://github.com/James-Yu/LaTeX-Workshop/blob/83e96dd6864c507822957fe4eb0dcec8c422433d/package.json#L808

I do not have access to a Windows computer and I thought there was a texmf directory inside C:\Program Files\MiKTeX 2.9 but I was wrong. Maybe, we could match C:/**MiKTeX*/** (mind the forward slashes). @tamuratak can you try it?

To my understanding, top directories of TeX Live,

  • /usr/local/texlive/2018/texmf-config/
  • /usr/local/texlive/2018/texmf-var/
  • /usr/local/texlive/2018/texmf-dist/

correspond to top directories of MiKTeX

  • CommonConfig: C:\ProgramData\MiKTeX 2.9
  • CommonData: C:\ProgramData\MiKTeX 2.9
  • CommonInstall: C:\Program Files\MiKTeX 2.9

respectively.

I will try it on Windows.

I guess you are right and we stopped watching files inside **/texmf-{dist,var}/** 8 months ago (6c20e0d). We should do the same for MiKTeX under Windows.

I was not able to set up the same setting on Windows.

Should be fixed. Do not hesitate to ask for reopening the issue if need be.

I am on Linux and I also started having this issue a few days (weeks?) ago. Adding the ignore commands does not help.

I have uninstalled every other extension (only Code Spell Checker, Error Lens and latex_formatter should have had any impact though) and tried switching back to 8.2.0 and I am now back at 8.3.1.

Synctex and recompiling are much better now and the delay is still noticeable but small enough not to bother me too much, but from time to time pressing enter still requires quite a few seconds (maybe around 5?).

I have a decently powerful pc with more than enough ram and I do not run anything but a web browser in addition to vscode.

It is unfortunately not reliably reproducible and I am not sure what I can provide to help diagnose this. There used to be absolutely no delay even with all the extensions running, all of which are uninstalled right now so I can actually still work. None of the extensions are listed as incompatible.

I have Code Spell Checker and do not have any freezing issue. LaTeX-Workshop already provides the formatting feature using latexindent.pl so you should not be using latex-formatter too.

Could you provide the extension logs (in particular the section related to watching and parsing) when you experience these temporary freezes.

Please open a new issue filling out information required in the issue template.

Was this page helpful?
0 / 5 - 0 ratings