Skip to content
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

TeXstudio crashes trying save a file #3

Closed
ghost opened this issue May 25, 2018 · 62 comments
Closed

TeXstudio crashes trying save a file #3

ghost opened this issue May 25, 2018 · 62 comments

Comments

@ghost
Copy link

ghost commented May 25, 2018

Dear developers,

I installed TeXstudio on my PC but I ran into the following issue:
TeXstudio is blank and has no opened file,
bildschirmfoto vom 2018-05-26 11-26-57, then I create a new file and try to save it. But by clicking on "save" or "save as" texstudio crashes.

If I start texstudio via the terminal I get the following output;

$  flatpak run org.texstudio.TeXstudio 
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
crashed with signal SIGSEGV
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )

[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]
[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]

[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]
[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]

[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]
[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]

[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]
[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]

"/tmp/texstudio_backtrace1.txt"
crashed with signal SIGSEGV
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )

[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]
[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]

[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]
[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]

[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]
[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]

[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]
[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]

"/tmp/texstudio_backtrace2.txt"
crashed with signal SIGSEGV
crashed with signal SIGSEGV
crashed with signal SIGSEGV
Forced kill after recovering failed after: SIGSEGV

An existing existing file, I can open, edit and save without problems.

@Alexander-Wilms
Copy link
Collaborator

I can't reproduce this. Can you use the bundled terminal (tools > open terminal) to copy the backtrace e.g. to ~ and upload it?

@ghost
Copy link
Author

ghost commented May 26, 2018

The bundled terminal doesn't show me any output when texstudio crashes, even though it stays open.

I could upload the files collected by abrt as I don't find the "/tmp/texstudio_backtrace2.txt" file. Also I'm using Fedora 28 with a Gnome desktop.

@Alexander-Wilms
Copy link
Collaborator

You can run cp /tmp/texstudio_backtrace1.txt ~ in the bundled terminal.

@RoyiAvital
Copy link

@Alexander-Wilms , Does TexStudio include the MiKTeX / TeXLive in its package?

@Alexander-Wilms
Copy link
Collaborator

It includes TeX Live 2018

@RoyiAvital
Copy link

@Alexander-Wilms, Where is it installed?
I installed TeXStudio from FlatPak (FlatHub) and I can see it works (Generates PDF).

Yet on some files which worked on Windows (TeXStudio + MiKTeX) doesn't work now (Those which includes eps files).

Any idea how to access TeXLive installed in this package and configure?

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 26, 2018

Have you tried compiling it with the TeX Live packaged by your distribution? I remember that pdflatex doesn't work with eps unless one uses the eps2pdf package.

You can get the path of the installed application with flatpak info org.texstudio.TeXstudio, but the files in there shouldn't be modified. Config files live in ~/.var/app/org.texstudio.TeXstudio/config/, not sure if TeX Live can be configured this way.

Edit: Just tried to compile a document containing an .eps and it failed due Ghostscript not being available. I'll try to fix this.

@RoyiAvital
Copy link

Also, When I press Ctrl+s to save document, TeXStudio crashes.
It seems it needs access to Home folder.

Is it launched with --filesystem=home?

@Alexander-Wilms
Copy link
Collaborator

@ghost
Copy link
Author

ghost commented May 26, 2018

@Alexander-Wilms I attached the backtrace files you asked for.
texstudio_backtrace1.txt
texstudio_backtrace2.txt
But there is nothing new in them.

@ghost ghost closed this as completed May 26, 2018
@ghost ghost reopened this May 26, 2018
@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 26, 2018

Thanks. Another thing you could try is installing org.texstudio.TeXstudio.Debug, running flatpak run --command=sh org.texstudio.TeXstudio and then following this guide: https://wiki.ubuntu.com/Backtrace#Generation

@RoyiAvital
Copy link

So something isn't working well.
For instance at every launch it is doing the testing procedure.

It crashes when:

  1. Create new file - Ctrl + N (Will be called Untitled).
  2. Save the file using Ctrl+S.

Which I thought is related to be able to access its folder (Maybe it is not configured as ~/?).

Also the GUI of TeX Live isn't working (Trying to launch tlmgr -gui).
It says:

tlmgr: Cannot load Tk, thus the GUI cannot be started!
The Perl/Tk module is not shipped with the TeX Live installation.
You have to install it to get the tlmgr GUI working.

I wonder if you can switch to MiKTeX.
On Windows TeXStudio + MiKTeX works perfectly.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 26, 2018

  • The testing procedure is enabled by default and can be disabled in the preferences.
  • Under KDE using xdg-desktop-portal-kde saving works fine, do you have the KDE portal installed?
  • I can try to bundle Tk tomorrow.
  • I don't see which issues would be fixed by switching to MiKTeX. Ghostscript is now bundled and I could compile a document containing an .eps just fine.

@RoyiAvital
Copy link

I'm new to Linux.
I'm not sure about KDE Portal.
I was under the impression FlatPak automatically downloads all needed files.

I have Linux Mint 18.3 if it assists with inferring the issue.

I will remove it and reinstall to see if it works now.

@Alexander-Wilms
Copy link
Collaborator

Can you try apt-get install xdg-desktop-portal-kde, log out and in again? Maybe if you're using Gnome the portal doesn't get installed automatically.

@RoyiAvital
Copy link

RoyiAvital commented May 26, 2018

I removed and reinstall.

  1. How can I be sure I got the latest updates you made?
  2. TeXStudio still crashes when I save (Either by Ctrl+S or Save / Save As in File Menu) untitled document.
  3. I still can't compile file with .eps.
  4. TeXStudio still says it can find XeLaTeX or LuaLaTeX.

So, the most important is 1 as all might be because I'm not on your latest version.

Can you share your document which works with .eps?

Regarding xdg-desktop-portal-kde.
I have /var/lib/flatpak/runtime/org.kde.Platform which I guess is what you mean, right?

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 26, 2018

  1. You can check if there's a green tick next to the latest commit here: https://github.com/flathub/org.texstudio.TeXstudio/commits/master Right now, the latest two commits just added comments, so after running flatpak update org.texstudio.TeXstudio, you'll have the version that contains Ghostscript.
  2. Are you using Gnome? Does this bug occur with TeXstudio 2.12.8 installed from the Linux Mint repos?
  3. Did you mean "can't"? After running flatpak update org.texstudio.TeXstudio, it should definitely work with lualatex, pdflatex and xelatex. If not, what error is shown in the log?
  4. What commands are shown in the preferences? Can you try running xelatex and lualatex in the terminal accessible via "Tools > Open Terminal"?
    The commands should look like this:
    screenshot_20180527_004219

Here's an example document, I compiled it with this eps file and lualatex

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{circle.eps}
\end{document}

No, org.kde.Plaform is a special flatpak, which provides a lot of common dependencies. xdg-desktop-portal-kde is a reguler non-flatpak package, which allows Flatpak apps to communicate with the host system via portals.

@RoyiAvital
Copy link

RoyiAvital commented May 26, 2018

I have xdg-desktop-portal installed.
When I do sudo apt-get install xdg-desktop-portal-kde is says no such package exist.

  1. When I run flatpak update org.texstudio.TeXstudio it doesn't say an update is available. This is what I get - flatpak update org.texstudio.TeXstudio Looking for updates.... Then it just gets back to command line.
  2. I'm on Linux Mint 18.3 with Cinnamon which I think is based on GTK. The whole idea is to use FlatPak as I prefer "Portable" installations.
  3. I get the same error with your eps file - Package pdftex.def Error: File circle-eps-converted-to.pdf' not found: using draft setting. \includegraphics{circle.eps}`. Currently I'm not sure if it is access issues (Still can't access file system properly which explains the crash) or the installation isn't updated.
  4. This is my configuration:

image

As you can see, GhostScript isn't configured.

  1. It still crashes when I try Save As.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 26, 2018

Hm, I've uninstalled xdg-desktop-portal-kde, instead using xdg-desktop-portal-gtk, and opening as well as saving files still works. So the portal actually doesn't make a difference. I currently don't know what else could cause the crash.

Maybe the Flathub mirrors near you haven't received that update yet. You can try building it yourself, though:

flatpak install flathub org.kde.Sdk 5.9
flatpak install flathub org.kde.Platform 5.9
flatpak install flathub org.flatpak.Builder
git clone https://github.com/flathub/org.texstudio.TeXstudio
cd org.texstudio.TeXstudio
flatpak run org.flatpak.Builder --force-clean --ccache --repo=texstudio-repo texstudio-build org.texstudio.TeXstudio.yaml
flatpak remote-add --no-gpg-verify texstudio-repo texstudio-repo
flatpak install texstudio-repo org.texstudio.TeXstudio
flatpak run org.texstudio.TeXstudio//master

The File circle-eps-converted-to.pdf' not found error is not due to filesystem permissions, it's just that Ghostscript is still missing. In my installation, the Ghostscript command listed in the preferences is gs "?am.ps"

@RoyiAvital
Copy link

RoyiAvital commented May 26, 2018

I have found something.
If on terminal I set export LC_ALL="en_US" LuaLaTeX can run.
Can you do that for TeXStudio as well and not only the terminal?

Is there any information I can supply to assist with the Save As crash?

Also, is there a place the version is written?
For instance, the metadata file in the FlatPak doesn't include any version field.
Could it be added?

Should it be able to find GhostScript automatically?
It is strange as in Windows MiKTeX doesn't require GhostScript to generate the PDF (Or at least download it automatically).

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 27, 2018

Can you do that for TeXStudio as well and not only the terminal?

I can add environment variables during the build. Does lualatex stop working after running unset LC_ALL?

You can install TeXstudio from the Linux Mint repos (should be version 2.12.8 as well) and test if the crash happens there as well.

For version information, you can run flatpak info org.texstudio.TeXstudio and get

Ref: app/org.texstudio.TeXstudio/x86_64/stable
ID: org.texstudio.TeXstudio
Arch: x86_64
Branch: stable
Origin: flathub
Date: 2018-05-26 14:23:38 +0000
Subject: Bundle Perl instead of using the Sdk as runtime (57514351)
Commit: 6fe410d12667cd53bd964e89ae995c2f0d1466c0838b0a30f69b87a19dd1c481
Parent: b5ca32a616ad8b8e1955b149c30133e4d502211106c6e04e3802dc5a365e9920
Location: /var/lib/flatpak/app/org.texstudio.TeXstudio/x86_64/stable/6fe410d12667cd53bd964e89ae995c2f0d1466c0838b0a30f69b87a19dd1c481
Installed size: 3,2 GB
Runtime: org.kde.Platform/x86_64/5.9

Apparantly, I can't yet update the version installed from Flathub either, since this commit does not yet include Ghostscript.

Subject let's you easily see which version of the flatpak you have. The TeXstudio version will in future versions be listed in /app/share/metainfo/org.texstudio.TeXstudio.appdata.xml.

I think TeXstudio should find Ghostscript automatically, I didn't change any preferences.
Maybe MiKTex uses the Perl script epstopdf instead of Ghostscript

@RoyiAvital
Copy link

This is the output of flatpak info org.texstudio.TeXstudio:

Ref: app/org.texstudio.TeXstudio/x86_64/stable
ID: org.texstudio.TeXstudio
Arch: x86_64
Branch: stable
Origin: flathub
Commit: 6fe410d12667cd53bd964e89ae995c2f0d1466c0838b0a30f69b87a19dd1c481
Location: /var/lib/flatpak/app/org.texstudio.TeXstudio/x86_64/stable/6fe410d12667cd53bd964e89ae995c2f0d1466c0838b0a30f69b87a19dd1c481
Installed size: 3.2 GB
Runtime: org.kde.Platform/x86_64/5.9

If we go by commit, we have the same commit.
I don't have the subject field.

If the commit is one to one identifier (Which is strange as it doesn't match the commit of GitHub) on my system it doesn't find GhostScript.

Could you share the configuration of GhostScript in TexStudio?
What's the binary file of GhostScript so I will be able to find it on the folder?

Indeed, without the LC_ALL the LuaLaTeX stops functioning.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 27, 2018

I currently have 2 versions of TeXstudio installed:

  • The version installed from Flathub (org.texstudio.TeXstudio//stable) does not yet include Ghostscript. That's why compiling the eps example still fails for you
  • The version I built on my computer (org.texstudio.TeXstudio//master) includes the latest commit and thus Ghostscript

You'll just need to wait, until a mirror near you has been updated. I didn't configure Ghostscript at all, TeXstudio found it automatically.

Do you have LC_ALL set on your host system?

@RoyiAvital
Copy link

RoyiAvital commented May 27, 2018

OK, So let's wait for the update for GhostScript.

But what can we do about the Save As issue?
It has to do with privileges or something.

By default on my system LC_ALL seems to be empty.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 27, 2018

Not sure. I think the backtrace in the OP is just TeXstudio's crash recovery. I found another way to trigger another crash and that contains more information:

In the pdf viewer, one needs to click the integrated pdf viewer button:

flatpak run --command=sh org.texstudio.TeXstudio
sh-4.3$ texstudio --pdf-viewer-only 
Using Wayland-EGL
Using the 'xdg-shell-v6' shell integration
Duplicate TitledPanelPage ID: "pdfannotations"
! SyncTeX Error : No file?
Assert failure: globalConfigManager at something in src/configmanager.cpp:72
Assert failure: globalConfigManager at something in src/configmanager.cpp:72
Assert failure: globalConfigManager at something in src/configmanager.cpp:72
Assert failure: globalConfigManager at something in src/configmanager.cpp:72

[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]
[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]

[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]
[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]

[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x24e) [0x7a396f]
[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x24e) [0x7a396f]

[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]
[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]

[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]
[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]

[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]
[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]

[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]
[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]

crashed with signal Assert failure: globalConfigManager at something in src/configmanager.cpp:72
Assert failure: globalConfigManager at something in src/configmanager.cpp:72 (TXS-Version  D )
Assert failure: globalConfigManager at something in src/configmanager.cpp:72 (TXS-Version  D )
Assert failure: globalConfigManager at something in src/configmanager.cpp:72 (TXS-Version  D )
Assert failure: globalConfigManager at something in src/configmanager.cpp:72 (TXS-Version  D )

[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]
[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]

[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]
[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]

[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]
[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]

[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]
[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]

[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x26c) [0x7a398d]
[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x26c) [0x7a398d]

[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]
[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]

[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]
[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]

[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]
[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]

[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]
[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]

crashed with signal SIGSEGV
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )
SIGSEGV (TXS-Version  D )

[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]
[bt] texstudio(_ZN12SimulatedCPU13set_from_realEv+0x41) [0x7a3b49]

[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]
[bt] texstudio(_Z15print_backtraceRK7QString+0x33) [0x7a31ff]

[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]
[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x59a) [0x9a4502]

[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]
[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]

[bt] /lib/libQt5Widgets.so.5(_ZNK7QTabBar5countEv+0xb) [0x7f0f36425269]
[bt] /lib/libQt5Widgets.so.5(_ZNK7QTabBar5countEv+0xb) [0x7f0f36425269]

[bt] texstudio(_ZN7Editors7editorsEv+0x9b) [0x7bd9f5]
[bt] texstudio(_ZN7Editors7editorsEv+0x9b) [0x7bd9f5]

[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x63f) [0x9a45a7]
[bt] texstudio(_ZN9Texstudio16recoverFromCrashEv+0x63f) [0x9a45a7]

[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]
[bt] texstudio(_Z7recoverv+0x9) [0x9a3f65]

[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x26c) [0x7a398d]
[bt] texstudio(_Z12txs_assert_xPKcS0_S0_i+0x26c) [0x7a398d]

[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]
[bt] texstudio(_Z10txs_assertPKcS0_i+0x2d) [0x7a39d9]

[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]
[bt] texstudio(_ZN22ConfigManagerInterface11getInstanceEv+0x28) [0x75a080]

[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]
[bt] texstudio(_ZN11PDFDocumentD1Ev+0x50) [0xb7413c]

[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]
[bt] texstudio(_ZN11PDFDocumentD0Ev+0x18) [0xb743ae]

crashed with signal SIGSEGV
crashed with signal SIGSEGV
crashed with signal SIGSEGV
Forced kill after recovering failed after: SIGSEGV

Aborted (core dumped)

@RoyiAvital
Copy link

RoyiAvital commented May 27, 2018

OK,
I got the updated version and indeed .eps support is there (GhostScript got installed).
Still can't use LuaLaTeX due to LC_ALL not being defined.
The question is how can define it at launch as LC_ALL="en_US"?

Unfortunately, Save As / Ctrl + Alt + S still crashes TeXStudio.
Does the log above tell you something about the problem?

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 27, 2018

What's the output when you run the command locale inside the sandbox? Is there an entry with an invalid value such as en_DE?

@RoyiAvital
Copy link

No.
I looked for those issues on the Net.
It seems it looks for LC_ALL which on Linux Mint for some reason isn't set.

I don't want to set it system wide.
So the question is whether or not there is a way to define it locally for TeXStudio.

If we do that and solve the Save As issue, this FlatPak will be amazing.

Though I still wish for a variant with MiKTeX instead of TeXLive.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 29, 2018

If you run export LC_ALL=C in the Sandbox, does that fix the issue without any adverse effect? If so, I'll add it to the manifest.

And does locale show this error when run in the sandbox of another app?

@ghost
Copy link
Author

ghost commented May 29, 2018

After exporting the locale I can run lualatex within the sandboxed terminal but within Texstudio lualatex still fails to compile the document.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 29, 2018

Is a log shown in TeXstudio? Does specifying the environment variable via flatpak run --env= help?

@ghost
Copy link
Author

ghost commented May 29, 2018

Specifying the environment variable like

$ flatpak run --env=LC_ALL=C org.texstudio.TeXstudio

got lualatex working for me. You want to check it yourself?

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 29, 2018

I currently can't use my computer, but I'll push this change in a minute.

@ghost
Copy link
Author

ghost commented May 29, 2018

I miraculously got the lualatex issue fixed on my laptop without exporting the environment variable but unfortunately I don't know any more how it was done.

But I'm very certain that there is also another way. I just can't reproduce it.
Can it be the difference between a system-wide installation and a user-specific installation?

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 29, 2018

I don't know enough about the inner workings of flatpak to say whether that could be the reason. People in the #flatpak IRC channel might know more.

If you use the VM only for testing, could you install KDE and test if TeXstudio still crashes when using KDE? I'm using Fedora 28 KDE as well, so that could help narrow down the problem.

@RoyiAvital
Copy link

@Alexander-Wilms , On my system flatpak run --env=LC_ALL=C org.texstudio.TeXstudio fixes things as well.
So pushing this can be intermediate solution.
But if there is issue with FlatPak's and locale as @JakobJakobson showed you should make the FlatPak people aware of that.

So only solving Save As is left :-).

@joergister
Copy link

concerning the portals and flatpak itself, It might be of interest what exact version of flatpak is installed.
I remember a bug in kdenlive concerning save as that was solved on flatpak version 0.11.04.
kdenlive is also based on the kde runtime, so it might be the same bug.
to test which version of flatpak you have installed,
flatpak --version

@ghost
Copy link
Author

ghost commented May 30, 2018

Running $locale in the flatpak terminal works fine if the flatpak is installed system-wide whereas it throws error messages if you install the flatpak package user-specific.
So I guess the locale issues is a flatpak issue as the "installation method" shouldn't make any difference.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented May 30, 2018

Nice find. Can you open an issue against https://github.com/flatpak/flatpak regarding the locale issue?

Also, I use flatpak 0.11.7-1. Which versions do you use, @JakobJakobson, @RoyiAvital?

@RoyiAvital
Copy link

I use the latest on Flatpak PPA - Flatpak 0.11.7.
My installation is System Wide installation.

@joergister
Copy link

@RoyiAvital mm so its probably not caused by this old flatpak bug

@Alexander-Wilms
Copy link
Collaborator

Maybe this change to the KDE Sdk fixes this: KDE/flatpak-kde-runtime@4c54d20

@RoyiAvital
Copy link

@Alexander-Wilms ,
How can I see if it is installed on my system?
As I don't remember seeing that kind of Run Time (Which should be installed automatically if the package requires it, shouldn't it?).

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented Jun 6, 2018

First the Sdk needs to be rebuilt, then TeXstudio. The org.kde.Platform runtime is a subset of the org.kde.Sdk and automatically installed, yes.

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented Jun 7, 2018

Can you update and test if the issue is now resolved?

@RoyiAvital
Copy link

RoyiAvital commented Jun 8, 2018

@Alexander-Wilms ,
I opened the terminal and ran flatpak update.
It updates few Run Times (Including org.kde.Platform) and org.texstudio.TeXstudio.

Now it seems the Save As works!

Appreciate your efforts!

@RoyiAvital
Copy link

RoyiAvital commented Jun 8, 2018

@Alexander-Wilms ,

The only issue is that the Save As opens on \ (Root Folder).
Could it be configured to open on ~\ (Home Folder)?

@Alexander-Wilms
Copy link
Collaborator

Doesn't it remember the last location? You could file a bug report against xdg-desktop-portal-kde.

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@Alexander-Wilms
Copy link
Collaborator

Alexander-Wilms commented Jun 9, 2018

Since the other issues don't mention

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

, you could create a new one.

You can file issues with the portal here: https://bugs.kde.org/enter_bug.cgi?product=xdg-desktop-portal-kde&Bugzilla_restrictlogin=on&GoAheadAndLogIn=Log%20in

@Alexander-Wilms
Copy link
Collaborator

@RoyiAvital Does the issue still occur wihout setting LC_ALL=C?

@RoyiAvital
Copy link

I will have a look and report.

@Alexander-Wilms
Copy link
Collaborator

@RoyiAvital ping

@RoyiAvital
Copy link

@Alexander-Wilms , Tried on the latest release.
It doesn't crash by default or by launching flatpak run --env=LC_ALL=C org.texstudio.TeXstudio.

The only caveat I find is that when the user chose "Save As" the dialog starts at / while I'd be happy if it started at ~/.

@Alexander-Wilms
Copy link
Collaborator

And does lualatex work if you unset LC_ALL?

@RoyiAvital
Copy link

No. LuaLaTeX and XeLaTeX doesn't work without flatpak run --env=LC_ALL=C org.texstudio.TeXstudio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants