-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Kpsewhich times out on Windows when using texlive-full #3653
Comments
Is this directory added to your PATH environment variable? |
Thanks, so if you run |
Yes, I get the correct path. But the problem is still there, whether I fill it or not. |
If I fill in the absolute path of article, idea will not prompt an error. But whether it's an absolute path or not doesn't seem to affect the final result. |
Thanks for the screenshots, certainly something weird is going on. Apparently IntelliJ cannot run system commands properly, even though the command prompt can. How did you install IntelliJ? |
I install IDEA in the path "D:\Softwares\JetBrains\IntelliJ IDEA Ultimate\bin" |
Thanks, the issue is that the command to find the package location times out. If you run this command, how long does it take, or does it hang?
Interesting is that most paths point to a texmf tree in C:/Users/Hello/ FYI These paths are coming from
|
The results are displayed very quickly when running in cmd. |
No 'tex' folder in 'C:\Users\Hello.texlive2024' No texmf-var folder , Only exist 'texmf-config' |
Hi. Idk if this is what's causing yours, but I had the same issue recently. IntelliJ compiled everything just fine, even though it underlined article and didn't think it could find the article class. Other packages were not underlined. I reinstalled MiKTeX (not sure if that was necessary), and the issue was still there. But it didn't make a variable for the %MiKTeX% value it added to the path. So I added it as a new variable, using the same bin file location in the first photo. Then I relaunched IntelliJ (may have restarted computer, too? can't remember) and the issue is gone now. I know you're using TeXLive, and not MiKTeX, but my issue was nearly identical, and we are both using Windows. What's funny is that, even though IntelliJ told me it couldn't find the article class, it was still finding other packages. |
Thanks for replying, but it doesn't work. |
Thanks, that is indeed very strange. The current timeout is 3 seconds, and somehow intellij cannot execute the command within 3 seconds but you can. |
OK |
I reinstalled and tested it, and the good news is the problem is fixed. In addition, when Idea loading project, it loses response for up to 60 seconds. |
Thanks, something is clearly not working properly because the |
First I removed all references from the Environment Variables and then re-installed the TeXiFy plugin you just provided, this time there also was no message that 'article' could not be found. In the end, running |
Sorry I don't quite understand. What environment variables do you have set now, and is the issues still there if you use the stable 0.9.7 version of TeXiFy? I still have no idea what could have caused the timeouts. |
I removed The issue is still there when I use the stable 0.9.7 version of TeXiFy |
I have the same problem (Windows 10, IntelliJ IDEA 2024.2.4 (Ultimate Edition), TeXiFy IDEA 0.9.7, TeX Live 2023 full with sources and docs). I was able to attach a debugger and can confirm the problem occurs due to running in the timeout when expanding the paths. Manually running As to why this happens: I'm pretty sure it is due to me having installed the full scheme. Some timings I measured on a SATA SSD:
Probably the easiest way to fix this is to add an optional parameter |
Thanks a lot for the research! Maybe the problem is specific to TeX Live full scheme on Windows only, as I don't see any problems with the full scheme on Linux. I will try to reproduce this. [Edit] On my Windows the command I don't quite understand why kpsewhich could take so long, but if it's only 5 seconds we could indeed change the timeout (maybe only for Windows?) and make sure it runs in the background so it doesn't block the UI. It is consistent at least with the observation above (#3653 (comment)) that the problem was fixed with increased timeout. A pull request would be appreciated! Then we can finetune from there. |
I created the pull request #3727. It is a rather simple (hot)fix due to another discovery I had when trying to fix this: It seems that the command runner does not recognize the command has stopped, i.e. it runs forever if you don't kill it manually as it happens in Are you able to verify on your side if the path expansion does not stop on itself, i.e. runs in the timeout and is killed? (Just to check if it is a me problem or a problem in general before trying to debug it.) |
So, I did some more digging and was able to independently (from the plugin) reproduce the behavior, i.e.
Reading the process' output before calling I'll try to think about a solution and will update the pull request if I find one. |
Yes, now I can reproduce the problem exactly as you describe: if I put 3 or 30 seconds as timeout, in both cases the command will run for the 3 or 30 seconds, even though the full output is already available much earlier - and when the output stream is read before the waitFor, this issue does not occur. Well found! |
Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
IntelliJ IDEA 2024.1.4 (Ultimate Edition)
Operating System
Windows 10
TeXiFy IDEA version
0.9.7
What I did (steps to reproduce)
I install livetex in D:/softwares/latex.
When I created a new project, Idea displays an underscore error.
In fact, the compiler knows where the 'article' is and outputs the result correctly, but it also prompts an error.
Minimal example to reproduce the problem
Expected behavior
There should be no error message in this article
Actual behavior
(if applicable) The full stacktrace of the exception thrown
The text was updated successfully, but these errors were encountered: