texstudio-org/texstudio

TeXstudio has CRASHED due to a unknown at ...

Closed this issue · 26 comments

(This is a duplicate of #2560, which is already marked closed. I try to provide more information here.)

Environment

  • TeXstudio: 4.3.1, 64 bit, installer version from the website
  • Qt: 5.15.2
  • OS: Windows 10, 64 bit, current updates
  • TeX distribution: TeXLive

Reproduces on two different machines. German laguage version is shown in the screenshot, which is what is default on my system, but I reproduced it with the English display language by actively changing it in the settings.

Expected behavior

TeXStudio does not "crash".

Actual behavior

TeXStudio "crashes" on startup with a popup ("crashes" in quotes, see below).
"TeXstudio has CRASHED due to a unknown at ..."

After that I see some hexadecimal address (e.g. "7ff959655bb6" or "71c640") which sometimes stays identical when restarting the software in quick succession (but I have seen vastly different addresses on the same machine).

There is also a second popup (appearing a bit later) that I can close with the "Cancel" button with and seems to have an empty textbox or a progress bar.

image

When I click "Yes, try to recover" I can continue working (but I didn't try for long; I managed to change the display language for instance).

In this case there will another "TeXstudio has CRASHED due to a unknown at ..." popup upon exiting TeXStudio (with another address).

The "texstudio_backtrace" file contains:

unknown at 71c640 (TXS-Version 4.3.1 R )
[bt] 000000000064dd70  ??? error: 487

How to reproduce

I cleaned everything in "%appdata%/TeXStudio", so I presume just launch the described version after a clean install and it should "crash". No other reproduction steps required.

Other things

I do not have this problem with 4.3.0 (Qt 5.15.2) and went back to this version for now. In #2560 it was mentioned that the 4.3.1 Qt6 version is not affected.
I should also mention, that I originally pulled in the version through chocolatey, but then uninstalled these versions and tried the installers from the website. I used choclatey to roll back to 4.3.0.

Thanks for this great software!

well, no.
The image clearly shows that you are at least restoring a file/session.
I have not seen or heard it crash just by starting clean, so something is missing.

any particular reason to use qt5 ?

well, no. The image clearly shows that you are at least restoring a file/session. I have not seen or heard it crash just by starting clean, so something is missing.

Was confused now too, because I was certain that it was a clean start^^ However, what I did was double-clicking a file (i.e. opening TeXStudio with a filename as cmd line argument).

Just tried it again (clean) without opening any file and then it does indeed not "crash". It "crashes" as soon as the first file gets opened, though.

any particular reason to use qt5 ?

It is the only option offered through the chocolatey package manager afaik (see here), which I use to keep software up to date.

then I need that file at least (or a stripped down version which crashes)

You are right. I'll will create such a file an be right back :)

(I just tried it with an empty file and it did not "crash", hence there must be something about all of the LaTeX files that I was using. Did never occured to me that this could be the issue.)

I have the same problem on v4.3.1 Qt Version 5.15.2. How can I start TeXstudio without it opening the last file I had open before that issue ocurred?

Edit: Just downgraded to v4.3.0 via chocolatey and can confirm the issue is gone.

there is a "restore session at startup" option

Took me a while to strip a file down.
Rename the attached file to "*.tex". Opening it in TeXStudio 4.3.1 always crashes for me.

crash.txt

File listing (utf-8, windows linefeeds CR-LF):

\documentclass[12pt]{scrartcl} %
\usepackage{thispackagedoesnotexist} %

miktex ?

TeXLive 2022 full (default settings just without the shipped editor).
Quite recent updates.

I'm sorry... This file just stopped crashing for me... (see comment below) Is there something persistent except the %appdata%/texstudio folder?

I always deleted this folder and tried to open the file. I can post a much longer version of the file which I actually use. Just have to remove some confidential stuff.

Nevermind, the file posted above does still crash, but only sometimes (in particular on the very first start after deleting %appdata%\texstudio)?

Here is a longer version much more related to what I'm actually working on. This crashes much more reliably.
iopart and iopams are not part of a standard LaTeX distribution, hence I tried to strip them (they are part of the IOP LaTeX template)
Notice, that I don't have iopart or iopams in the folder where I have crashlong.tex.

crashlong.txt
(delete %appdata%/texstudio, rename to crashlong.tex in an empty folder and open in texstudio)

no, %appdata%... is the only persistent
does it also happen with txs qt6 (try with portable version)

you could try to remove packageCache.dat in the %appdata%... directory.

Okay. Took me a moment, since I did get confused with all the versions in the middle.

For comparibility I just updated all texlive full 2022 packages to the most recent version.
I use the portable version of TeXStudio, except for 4.3.0 where I can't find it on the website, there I use the installed version from chocolatey.
Here are the steps I take:

  • Delete the %appdata%/texstudio directory (I re-extracted the portable ZIP files for each test, since I think there is something strored in the config dir?)
  • Open either version of TeXStudio directly
  • No version crashes at this stage
  • Open the short, two-liner crash.tex and crashlong.tex in an otherwise empty directoy

Results:

  • TS 4.3.1 Qt5: crashlong.tex crashes, crash.tex is fine.
  • TS 4.3.1 Qt6: None of the files crashes
  • TS 4.3.0 Qt5: None of the files crashes

you could try to remove packageCache.dat in the %appdata%... directory.

I did, but with no observed effect. The installed TS 4.3.1 Qt5 still crashes with both supplied files (in case of the short file at least sometimes)

unfortunately it does not crash on linux/qt5 which makes debugging tedious.

Yes... I also noticed that it was very hard to even create a file that "crashes" reliably as you can see from my posts above.

Is there any debug mode that can be enabled in windows to obtain verbose logging on my end?

unfortunately there is not. You could compile txs yourself (see wiki) and run it in a debugger.
But it looks like it is related to qt5/mxe and maybe it is time to retire that build.

(mxe has not been updated for some time...)

As long as the Qt6 version works, I'd say it's probably not worth the effort...

I'd much rather like to have the chocolatey version switch to Qt6.
I'll probably contact the maintainer there and ask them to add this as an option or better the default?

Would you say that the Qt5 version is deprecated anyways?

yes,qt5 is deprecated, qt6 is the default.

Okay. Then I'll write to the maintainer of the chocolatey package and refer them to this thread.

Thanks for your help and thoughts! :)

assume mxe/qt5 issue

Just downgraded to v4.3.0 via chocolatey and can confirm the issue is gone.

This solved the issue for me!