texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.81k stars 345 forks source link

No further compilation possible after (accidentally) trying to compile non-.tex-file. #3371

Open flenzen opened 11 months ago

flenzen commented 11 months ago

Environment

Actual behavior

After trying to compile a document that cannot be compiled (e.g., by hitting F5 in a .sty file instead of the .tex-file), TXS won't be able to abort compilation and won't compile ANY DOCUMENT anymore, even if switching to a tex file.

Expected behavior

If compilation fails, TXS should just be able to still invoke latex on other documents.

How to reproduce

Create a non-.tex file, try to compile (which, of course, fails). Then no further compilation is possible, and the (failed) command cannot be aborted (although it is not running anymore).

https://github.com/texstudio-org/texstudio/assets/342447/b76da93e-596e-47ed-8baf-47082d515d0a

octaeder commented 11 months ago

When I use the style file test2.sty given with \ProvidesPackage{X} and do compile&view with pdflatex several things are different here.

This is with win10 and miktex, txs 4.6.3.

flenzen commented 11 months ago

To be clear, I know that the correct extension is .tex. it happens to me that I occasionally edit a (not project specific) .sty file that some .tex files I am editing depend on, and then hit F5 in the .sty file erroneously. It's annoying that I have to restart TXS in this case.

octaeder commented 11 months ago

With 4.7.0beta2-1: A build of the temp. sty-File opens the log pane and shows two issues: image But other builds still work. A build of the saved .sty-File opens the log pane but there are no issues presented. Again other builds still work.

sunderme commented 11 months ago

sounds like #3254 There stopping works, but you need to stop/press esc several times.

fvirdia commented 2 months ago

Having the same problem here. On Linux this was not happening, for me it started when I transitioned to using macos.

Using: TexStudio 4.8.1 macos 14.6.1

hscells commented 1 month ago

I also just wanted to say that I'm also experiencing this bug. I often have separate .sty files open at a time and it is very frustrating to have to completely restart TXS each time I accidentally try to compile one.

Using: TeXstudio 4.8.3 macos 14.6

sunderme commented 1 month ago

On linux, there is no adverse effect when trying to compile a .sty-file. If defaults are not changed, it is even not possibly to compile a .sty file as the the default just uses the basename without extension as compilation file. So, some essential info is missing here.

hscells commented 1 month ago

mre.zip

here is a minimum reproducible example. Open example.tex, compiles fine. Open example-sty.sty (which is just an empty file) and try to compile it, I get the error in my screenshot and nothing can be compiled until I restart TXS.

Screenshot 2024-09-26 at 09 30 46

Nothing in the Log, but in the Messages tab, I get:

Process started: pdflatex -synctex=1 -interaction=nonstopmode "example-sty".tex

Process exited with error(s)

With no more useful information.