Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
6.06k stars 2.06k forks source link

Opening folder where toolpath is stored crashes xdg-open #10260

Open Duke-Jones opened 3 years ago

Duke-Jones commented 3 years ago

Application Version

4.10.0

Platform

Manjaro (current) with KDE Plasma (current)

Printer

Ender 3 Pro

Reproduction steps

Slice something and press "Save to Disk. Then Press button "Open Folder" on the shown dialogbox.

Actual results

Nothing happens. If I open Cura from the command line I can see following message:

/usr/bin/xdg-open: Zeile 613: 20165 Speicherzugriffsfehler (Speicherabzug geschrieben) kde-open${KDE_SESSION_VERSION} "$1"

Expected results

Current folder in the file-tool (in this case Dolphin) should be opened.

cura.log

I

Checklist of files to include

Additional information & file uploads

At the beginning of the year, this already worked. However, the error has been occurring for a few months.

fvrmr commented 3 years ago

Hi @Duke-Jones I will bring this up with the team. Keep you posted!

fvrmr commented 3 years ago

Hi @Duke-Jones do you use the AppImage of Cura?

Duke-Jones commented 3 years ago

Hi. Yes, I do.

.... ahm, I'm not sure. I use "cura-appimage-bin" which is provided from the AUR.

fvrmr commented 3 years ago

Ah, we don't maintain those. Here you can find the appimage from 4.10: https://github.com/Ultimaker/Cura/releases/tag/4.10.0 Could you try if this one doesn't have your issue?

Duke-Jones commented 3 years ago

Ok. I uninstalled Cura, downloaded and installed the appimage from Github. But nothing changes.

fvrmr commented 3 years ago

Hmmm, can you share your log from the appimage?

Duke-Jones commented 3 years ago

Sure. Where can I find it ?

fvrmr commented 3 years ago

Here: $HOME/.local/share/cura/<Cura version>/cura.log

Duke-Jones commented 3 years ago

cura.log

fvrmr commented 3 years ago

I can't see anything in your log. Could you try to use GNOME instead of KDE?

Duke-Jones commented 3 years ago

I am sorry. I am glad that KDE runs reasonably. Switching to GNOME is too much for me with my level of knowledge.

Ghostkeeper commented 3 years ago

Yeah switching window managers is very intrusive. It should run on KDE just as well as on GNOME. Some of our developers are on KDE and some on GNOME. No crashes with these reproduction steps for us.

The error itself indicates that a segfault occurred in a script in your computer, in /usr/bin/xdg-open on line 613. This script is part of your system, not part of Cura. It is a script that is supposed to open paths and determine the correct application to do that with. Since it's part of your computer, I don't think there's a lot that Cura can do to prevent this crash. It seems like a bug in Arch to me.

Of course, Cura might call the xdg-open script in a different way to workaround the problem. However Cura's own code doesn't call upon this script either. It's called by the Qt framework. The code we have under our control is simply this:

QDesktopServices.openUrl(QUrl.fromLocalFile(message._folder))

(Where message._folder is the path to the folder where the file was just saved, e.g. /home/ghostkeeper/Projects/Slices.)

There's very little we can control here. Couldn't call this function differently. We can only control the URL we provide to that function. But to debug that, we need to test what URLs is giving your system script problems.

According to this question on StackOverflow, some xdg-open scripts don't deal well with spaces in the path. However in your log it appears like you saved the g-code file to /home/duke/Dokumente/3D/g_code/Lagerring.gcode, which contains no spaces so that couldn't be it.

You could try to save the g-code to a folder without any underscores, maybe? But I wouldn't think that would give your xdg-open script any problems.