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

Cura 5 won't open files #12266

Closed
1 of 2 tasks
VK1IAN opened this issue May 19, 2022 · 112 comments
Closed
1 of 2 tasks

Cura 5 won't open files #12266

VK1IAN opened this issue May 19, 2022 · 112 comments
Labels
Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. Type: Bug The code does not produce the intended behavior.

Comments

@VK1IAN
Copy link

VK1IAN commented May 19, 2022

Application Version

5.0.0

Platform

Ubuntu 20.04

Printer

Cocoon Create

Reproduction steps

  1. Cura opens fine. I can change print settings and work my way through the menus. I can also configure Cura (Preferences->Configure Cura).
  2. When I click the folder at top left (to open a file), nothing happens.
  3. If I try it via File->Open File(s), nothing happens.
  4. I can drag a STL onto the print bed, set up the parameters and slice, but then I can't save the resulting gcode to disk.
  5. "Save to removable media" does work.

Actual results

"Open File(s)" dialog box doesn't appear.
After I've dragged a STL onto the print bed and sliced, nothing happens when I click "Save to Disk" (i.e "save to disk" dialog box does not appear).

Expected results

File dialog box should appear to allow me to open files or select the destination for a gcode file.

Checklist of files to include

  • Log file
  • Project file

Additional information & file uploads

cura.log

@VK1IAN VK1IAN added the Type: Bug The code does not produce the intended behavior. label May 19, 2022
@Vandresc
Copy link
Contributor

Hi, @VK1IAN any chance you are using Debian 11?

@Vandresc Vandresc added the Status: Needs Info Needs more information before action can be taken. label May 30, 2022
@Vandresc Vandresc added the Status: Under Investigation The issue has been confirmed or is assumed to be likely to be a real issue. It's pending discussion. label May 30, 2022
@VK1IAN
Copy link
Author

VK1IAN commented May 30, 2022

Hi, @VK1IAN any chance you are using Debian 11?

Ubuntu 20.04 (in a VirtualBox VM)

@github-actions github-actions bot removed the Status: Needs Info Needs more information before action can be taken. label May 30, 2022
@Vandresc
Copy link
Contributor

Devs see CURA-9348 for our internal reference.

@Vandresc Vandresc added Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. and removed Status: Under Investigation The issue has been confirmed or is assumed to be likely to be a real issue. It's pending discussion. labels May 31, 2022
@akshimassar
Copy link

The same thing happens for me. I'm using arch linux with AppImage

@akshimassar
Copy link

That seems to be problem with opening "open" dialog. I successfully opened file from Open Recent menu.

@akshimassar
Copy link

PyInstaller/loader/pyimod03_importers.py:495: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
Cyclic dependency detected between "file:///tmp/.mount_cura5RySS4x/share/cura/resources/qml/Actions.qml" and "file:///tmp/.mount_cura5RySS4x/share/cura/resources/qml/Actions.qml"
QQmlEngine::setContextForObject(): Object already has a QQmlContext

@akshimassar
Copy link

Corresponding action ( I guess) from Actions.qml

    Action
    {
        id: openAction
        property var fileProviderModel: CuraApplication.getFileProviderModel()

        text: catalog.i18nc("@action:inmenu menubar:file","&Open File(s)...")
        icon.name: "document-open"
        // Unassign the shortcut when there are more than one file providers, since then the file provider's shortcut is
        // enabled instead, and Ctrl+O is assigned to the local file provider
        shortcut: fileProviderModel.count == 1 ? StandardKey.Open : ""
    }

Is there anything I can do to help debugging?

@akshimassar
Copy link

Save project file dialog won't open as well.

@lf94
Copy link

lf94 commented Jun 3, 2022

This issue needs severity critical.

@Claghorn
Copy link

Claghorn commented Jun 5, 2022

Same problem on fedora 36. Running in a terminal shows this stuff:
PyInstaller/loader/pyimod03_importers.py:495: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses Cyclic dependency detected between "file:///tmp/.mount_UltimaVg8T4R/share/cura/resources/qml/Actions.qml" and "file:///tmp/.mount_UltimaVg8T4R/share/cura/resources/qml/Actions.qml" QQmlEngine::setContextForObject(): Object already has a QQmlContext qt.qml.context: file:///tmp/.mount_UltimaVg8T4R/share/cura/resources/qml/Settings/SettingView.qml:427:16 Parameter "index" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.

@akshimassar
Copy link

Is there any workaroud for that issue? I would like to use cura 5 but for now I can't

@minego
Copy link

minego commented Jun 6, 2022 via email

@akshimassar
Copy link

What about saving resulting g-code? None of the system dialogs of this kind work.

You can drag a file onto cura to open it

@minego
Copy link

minego commented Jun 6, 2022 via email

@akshimassar
Copy link

Here is the error from corresponding cura.log file

2022-06-06 23:19:03,545 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [431]: file:///home/akshi/appimage/squashfs-root/share/cura/resources/qml/Cura.qml:629:5: QML FileDialog: Failed to load non-native FileDialog implementation:
qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/FileDialog.qml:37 module "Qt.labs.folderlistmodel" is not installed

@akshimassar
Copy link

I've tried installing following packages python-pyqt5 qt5-declarative qt5-quickcontrols (to provide folderlist module) and the error from log is gone but open / save dialogs are still not working.

@alexban01
Copy link

What about saving resulting g-code?

save it to removable and then move it wherever you want. Annoying I know, hope they fix it soon. This is the reason why I'm still on 4.13.1 where I get like 8 error messages telling me the plugins fail

@tbranyon
Copy link

Have the same problem on Lubuntu 22.10 (LXQT 0.17.0) in both Cura 5.2.2 and 5.3.0. Resolved by "apt install flatpak".

@jsrobson10
Copy link

i have the same issue

@EPN-Pleyben
Copy link

Works on Gentoo with kde-plasma but not on Debian 11 with KDE. Open or Save doesn't open file dialog. Drag and drop works to open the file but impossible to export the gcode file anywhere. Tried with 5.22, 5.3 and 5.4Alpha

@AtomicRPM
Copy link

Can confirm that this is resolved on Gentoo by installing the xdg-desktop-portal packages. emerge -av xdg-desktop-portal xdg-desktop-portal-gtk

Thank you!

@MariMakes
Copy link
Contributor

Quick update on our side. We might have a fix for this issue. 🎉
It's a bit hard for us to test, but we have a nightly build available.

Can you please try it out and let us know if it resolves your issue?
You can find the download links and the discussion here: #15098

@drohhyn
Copy link

drohhyn commented May 5, 2023

Seems to work for me (Ubuntu 22.10 with modern AppImage): my problem was mainly the save-to-disk-dialog. It directly worked, even with the custom name plugin and switching the file type. Thank you!

However the save dialog does not get focus. In the screenshot you can see both Cura 4.x and 5.4 with save-dialogs. For the older version it is "part" of the app and pops up in front of the main screen. In the newer version it is of the type "portal" (whatever this is) and pops up behind the main screen.
For now I am happy because setting the names be hand was so annoying that I sticked to version 4 and just alt-tab to the save-dialog is just a minor inconvenience.

Update: when changing the type from gcode to ufp, the extension still stays gcode. Thus results in a file named example.gcode which is an ufp file in reality.

@DySprozin
Copy link

Seems to work for me too (Xubuntu 20.04 with NO-modern AppImage)

@GreyzardBigME
Copy link

Have the same problem on Lubuntu 22.10 (LXQT 0.17.0) in both Cura 5.2.2 and 5.3.0. Resolved by "apt install flatpak".

thanks! it worked on Lubuntu 22.04.2 on my Asus X501A, it also seems pretty fast after upgrading the ram from 2 GB to 8 GB and previously also an SSD!

@o7-machinehum
Copy link

Does anyone have a solution for this? Installed xdg-desktop-portal xdg-desktop-portal-gtk doesn't work for me on arch. I'm using Cura from the AUR

@o7-machinehum
Copy link

This works

cura -platformtheme gtk3

@ethanak
Copy link

ethanak commented May 27, 2023

Thanks a lot! Works perfectly for me (Ubuntu 20.04, Cura 5.3.1 AppImage)

@Rollerf
Copy link

Rollerf commented Jun 19, 2023

For myself, installing xdg-desktop-portal and xdg-desktop-portal-gtk did resolve the issue. It took several minutes though - I don't know enough about DBUS guts to understand why. I suspect if you log out/in or reboot after installing those packages, it'll take care of it. I also switched to the 'modern' appimage, which silently failed instead of crashing. I didn't test the non-modern appimage after getting things working.

It works for me too, thanks! I'm using Ubuntu 22.04 and Cura 5.3.1-linux-modern AppImage.

@Jorenar
Copy link

Jorenar commented Jun 24, 2023

cura -platformtheme gtk3 works for me too (interestingly, QT_QPA_PLATFORMTHEME=gtk3 cura doesn't)

@drohhyn
Copy link

drohhyn commented Jul 7, 2023

Update: when changing the type from gcode to ufp, the extension still stays gcode. Thus results in a file named example.gcode which is an ufp file in reality.

With version 5.4.0 is got worse again: now I can change to ufp in the filename but still only a gcode file is generated.

@drohhyn drohhyn mentioned this issue Jul 7, 2023
2 tasks
@howels
Copy link

howels commented Sep 16, 2023

Setting -platformtheme gtk3 fails to fix the 5.4.0 AppImage build on Ubuntu 22.04. I have xdg-desktop-portal-gtk installed already.

Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Numix/16/status/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: pango_attr_overline_new (gdk-pixbuf-error-quark, 5)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Numix/16/status/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: pango_attr_overline_new (gdk-pixbuf-error-quark, 5)
/tmp/.mount_UltiMa0Slgha/AppRun: line 25: 22193 Aborted                 (core dumped) $scriptdir/UltiMaker-Cura "$@"

@Tecol87
Copy link

Tecol87 commented Sep 21, 2023

I use version 5.4 via flatpak on Debian 12. -platformtheme gtk3 works for me, no desktop-portal stuff is installed. I use sway.

@howels
Copy link

howels commented Sep 21, 2023

Hmm. The flatpak version of 5.4.0 works for me with no changes but the appImage always crashes. How strange.

@MariMakes
Copy link
Contributor

👋 Quick update on our side.

I'll be closing this thread to bring back somefocus on the most requested and needed features and bug fixes from our community and from UltiMaker,

If your issue is related to xdg-desktop-portal-gtk, than it should be resolved in the 5.5 Beta release 🎉 , you can download the Cura version with the fix here: https://github.com/Ultimaker/Cura/releases/tag/5.5.0-beta.1

If you are experiencing a crash similar as this one related to a missing icon, perhaps it looks like this:

Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Papirus-Dark/16x16/actions/image-missing.svg: Unable to load image-loading module: libpixbufloader-svg.so: libpixbufloader-svg.so: cannot open shared object file: No such file or directory (gdk-pixbuf-error-quark, 5) Bail out! 
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Papirus-Dark/16x16/actions/image-missing.svg: Unable to load image-loading module: libpixbufloader-svg.so: libpixbufloader-svg.so: cannot open shared object file: No such file or directory (gdk-pixbuf-error-quark, 5)

We are collecting cases in this ticket: #16932
This ticket also contains an Alpha build that perhaps might resolve the crash for you, but it doesn't seem to help everyone.

Thanks for all the feedback. Together we can make Cura better 😊

@Jorenar
Copy link

Jorenar commented Oct 27, 2023

@MariMakes

If your issue is related to xdg-desktop-portal-gtk, than it should be resolved in the 5.5 Beta release 🎉

Well, I've just installed the release 5.5.0 and the issue remains the same,
with the same workaround of launching with -platformtheme gtk3

@Nannk
Copy link

Nannk commented Mar 7, 2024

Version 5.6 still has this issue.
Except now it crashes when i try to open the open file dialog.
-platformtheme gtk3 workaround still works too.

@Igazii
Copy link

Igazii commented Mar 26, 2024

@Nannk @Jorengarenar The issue in my case was caused by libpixbufloader-png.so component. It doesn't exist on my ubuntu 22.04. So i've downloaded .deb for 20.04 and used component from it, finally updated cache. This workaround did the trick for me, you dont have to specify platformtheme with this workaround it works just fine.

wget http://archive.ubuntu.com/ubuntu/pool/main/g/gdk-pixbuf/libgdk-pixbuf2.0-0_2.40.0+dfsg-3_amd64.deb && mkdir pixbuf2_temp && cd pixbuf2_temp

ar x ../libgdk-pixbuf2.0-0_2.40.0+dfsg-3_amd64.deb && tar -xf data.tar.xz && sudo mv ./usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/ && cd ..

sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache

@brett-olsen
Copy link

brett-olsen commented Apr 2, 2024

Just posting a quick comment here, "cura -platformtheme gtk3" did not work for me at all, the Cura experience on Arch Linux was horrible with Cura 5.6.0. No installation source, flatpaks or appimages helped, so sharing what worked for me personally.

My Issue (to clarify):
Opening Cura worked fine, opening files from inside Cura, via file open, or drag n drop, and external to Cura via file associations did not work. Cura simply never loaded the models and continued to run fine, just with with no models/objects.

My Solution (which worked for me):
I can now open files in Cura, via the file open menu, double-clicking the icon, drag and dropping models.

cura -platformtheme gtk3 still required (did not fix the issue for me)
disabled the following plugins (marketplace, click the gear icon):
- firmware update checker
- firmware updater
- makerbot printfile writer
- ufp reader
- ufp writer
- ultimaker digital library
- ultimaker machine associations
- um3 network printing
- update checker
- usb printing

Cura 5.6.0 now works reliably, with good performance on loading objects/models, hope this helps someone who was stuck with their version of Cura being broken on Linux and not being able to open any files :)

Update: for the graphic redraw/performance issues under wayland the following was a solution for me: "env QT_QPA_PLATFORM=xcb cura -platformtheme gtk3" so adding the environment variable QT_QPA_PLATFORM=xcb solved the slow redraw for me on Arch Linux, using Cura 5.6.0

@domo141
Copy link

domo141 commented May 2, 2024

Thanks for the instructions -- worked for me -- with Cura 5.7.1.

Before deleted everything I ran WAYLAND_DISPLAY= flatpak run --unshare=network com.ultimaker.cura -platformtheme gtk3 -- got it working there but cannot state the configuration exactly...

(with these steps I used the flatpak version -- first time for me -- but I'd expect things would work with AppImage too)

so, clean up configs to get clear picture:

$ rm -rf ~/.config/cura
$ rm -rf ~/.cache/cura
$ rm -rf ~/.var/app/com.ultimaker.cura

Now (just -- on fedora 39, with labwc wayland compositor -- started from gdm):

$ flatpak run --unshare=network com.ultimaker.cura

Went thru setting a "non-networked printer" -- dialog was somewhat "fuzzy" there...

Then, clicked [Marketplace] and that "gear icon" there.

Nice that the list in previous comment is in alphaphetical order so it was easy to follow,
there was one difference: ultimaker machine actions in this 5.7.1...

After disabling all listed above, exit took some time (more than 10 secs, I was not counting...)

Then, next run flatpak run --unshare=network com.ultimaker.cura worked nicely -- like in cura 4.5.0 times,
.stl file opened immediately and GUI seemed to work like before. Exiting Cura was immediate!

So, thanks againg brett-olsen !

@pouriamoosavi
Copy link

pouriamoosavi commented Jun 12, 2024

So we have to go through all these steps just to run a simple application, and no one even knows why?

Just posting a quick comment here, "cura -platformtheme gtk3" did not work for me at all, the Cura experience on Arch Linux was horrible with Cura 5.6.0. No installation source, flatpaks or appimages helped, so sharing what worked for me personally.

My Issue (to clarify): Opening Cura worked fine, opening files from inside Cura, via file open, or drag n drop, and external to Cura via file associations did not work. Cura simply never loaded the models and continued to run fine, just with with no models/objects.

My Solution (which worked for me): I can now open files in Cura, via the file open menu, double-clicking the icon, drag and dropping models.

cura -platformtheme gtk3 still required (did not fix the issue for me) disabled the following plugins (marketplace, click the gear icon): - firmware update checker - firmware updater - makerbot printfile writer - ufp reader - ufp writer - ultimaker digital library - ultimaker machine associations - um3 network printing - update checker - usb printing

Cura 5.6.0 now works reliably, with good performance on loading objects/models, hope this helps someone who was stuck with their version of Cura being broken on Linux and not being able to open any files :)

Update: for the graphic redraw/performance issues under wayland the following was a solution for me: "env QT_QPA_PLATFORM=xcb cura -platformtheme gtk3" so adding the environment variable QT_QPA_PLATFORM=xcb solved the slow redraw for me on Arch Linux, using Cura 5.6.0

@johonan
Copy link

johonan commented Jun 12, 2024

A thorough solution is to use prusa slicer, or maybe orca if it works well under linux

@VK1IAN
Copy link
Author

VK1IAN commented Jun 12, 2024 via email

@krayon
Copy link
Sponsor

krayon commented Aug 3, 2024

2024-08-03 19:05:02,691 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [448]: file:///tmp/.mount_curaURZHTH/share/cura/resources/qml/Cura.qml:624:5: QML FileDialog: Failed to load non-native FileDialog implementation:
qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/FileDialog.qml:4 module "Qt.labs.folderlistmodel" is not installed

I still get a segfault in 5.7.2, though the alternative theme engine (-platformtheme gtk3) workaround works.

@MariMakes Could you clarify if this is a "won't fix, use the workaround" situation or is this bug still being tracked elsewhere? Many related issues are closed and seem to link back to this one.

Update: sorry, just found #16815 documenting the above.

cc: @akshimassar as you had the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. Type: Bug The code does not produce the intended behavior.
Projects
None yet
Development

No branches or pull requests