Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cura does not start, "QQmlApplicationEngine failed to load component"
Forum Updated to NodeBB v4.3 + New Features

Cura does not start, "QQmlApplicationEngine failed to load component"

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hrnick
    wrote on last edited by
    #1

    I have troubles getting Cura to start on my Gentoo system. I have had the same problem for v4.6.1, 4.8.0 and 4.9.0. The Python version I have built against has been 3.7 and 3.9, again with the same result regardless of the version. The output from Cura 4.9.0 built against Python 3.9.5 can be seen below.

    $ cura 
    /usr/lib/python3.7/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    [MainThread] UM.Application.initialize [160]: Initializing Ultimaker Cura
    [MainThread] UM.Application.initialize [161]: App Version 4.9.0
    [MainThread] UM.Application.initialize [162]: Api Version 7.5.0
    [MainThread] UM.Application.initialize [163]: Build type ebuild
    [MainThread] UM.Resources.__initializeStoragePaths [446]: Initializing storage paths
    [MainThread] UM.Resources.__initializeStoragePaths [456]: Config storage path is /home/hrnick/.config/cura/4.9
    [MainThread] UM.Resources.__initializeStoragePaths [464]: Data storage path is /home/hrnick/.local/share/cura/4.9
    [MainThread] UM.Resources.__initializeStoragePaths [476]: Cache storage path is /home/hrnick/.cache/cura/4.9
    [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/cura/resources/bundled_packages/cura.json
    [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/uranium/resources/bundled_packages/uranium.json
    Attribute Qt::AA_UseDesktopOpenGL must be set before QCoreApplication is created.
    [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [118]: Trying OpenGL context 4.1...
    [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [128]: Yay, we got at least OpenGL 4.1 core: 4.1 Core profile
    [MainThread] UM.Qt.QtApplication.initialize [175]: Detected most suitable OpenGL context version: 4.1 Core profile
    [MainThread] UM.Qt.QtApplication.initialize [182]: Initializing job queue ...
    [MainThread] UM.Qt.QtApplication.initialize [186]: Initializing version upgrade manager ...
    [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/cura/resources/bundled_packages/cura.json
    [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/uranium/resources/bundled_packages/uranium.json
    [MainThread] UM.PackageManager._loadManagementData [192]: Loaded user packages management file from /home/hrnick/.local/share/cura/4.9/packages.json
    [MainThread] UM.PackageManager._saveManagementData [265]: Package management file /home/hrnick/.local/share/cura/4.9/packages.json was saved
    [MainThread] UM.PluginRegistry.initializeBeforePluginsAreLoaded [117]: Loading plugin configuration file '/home/hrnick/.config/cura/4.9/plugins.json'
    Cyclic dependency detected between "file:///usr/share/cura/resources/qml/Actions.qml" and "file:///usr/share/cura/resources/qml/Actions.qml"
    QQmlApplicationEngine failed to load component
    WARNING: Cannot find style "default" - fallback: "/usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop"
    

    What strikes me as odd is that "QQmlApplicationEngine failed to load component" does not specify what component can't be loaded and I don't really know where to start troubleshooting. Someone suggested that it might be related to "something between Python and Qt and/or PyQt itself" in the Gentoo bug report I filed and that it might be worth asking the QT community for tips and help. So that's what I'm doing now.

    Have you any idea of what might be wrong or where and how I can start looking to get to the bottom with this? The Ultimaker Cura AppImage works but I would really like to figure out what's wrong here and use Cura installed through the Gentoo package manager. There seems to be at least a few other users who have run into the same problem as me.

    Bug report at bugs.gentoo.org
    Post on forums.gentoo.org

    Any help would be highly appreciated! Thanks!

    J.HilkJ 1 Reply Last reply
    0
    • H hrnick

      I have troubles getting Cura to start on my Gentoo system. I have had the same problem for v4.6.1, 4.8.0 and 4.9.0. The Python version I have built against has been 3.7 and 3.9, again with the same result regardless of the version. The output from Cura 4.9.0 built against Python 3.9.5 can be seen below.

      $ cura 
      /usr/lib/python3.7/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
        import imp
      [MainThread] UM.Application.initialize [160]: Initializing Ultimaker Cura
      [MainThread] UM.Application.initialize [161]: App Version 4.9.0
      [MainThread] UM.Application.initialize [162]: Api Version 7.5.0
      [MainThread] UM.Application.initialize [163]: Build type ebuild
      [MainThread] UM.Resources.__initializeStoragePaths [446]: Initializing storage paths
      [MainThread] UM.Resources.__initializeStoragePaths [456]: Config storage path is /home/hrnick/.config/cura/4.9
      [MainThread] UM.Resources.__initializeStoragePaths [464]: Data storage path is /home/hrnick/.local/share/cura/4.9
      [MainThread] UM.Resources.__initializeStoragePaths [476]: Cache storage path is /home/hrnick/.cache/cura/4.9
      [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/cura/resources/bundled_packages/cura.json
      [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/uranium/resources/bundled_packages/uranium.json
      Attribute Qt::AA_UseDesktopOpenGL must be set before QCoreApplication is created.
      [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [118]: Trying OpenGL context 4.1...
      [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [128]: Yay, we got at least OpenGL 4.1 core: 4.1 Core profile
      [MainThread] UM.Qt.QtApplication.initialize [175]: Detected most suitable OpenGL context version: 4.1 Core profile
      [MainThread] UM.Qt.QtApplication.initialize [182]: Initializing job queue ...
      [MainThread] UM.Qt.QtApplication.initialize [186]: Initializing version upgrade manager ...
      [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/cura/resources/bundled_packages/cura.json
      [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/uranium/resources/bundled_packages/uranium.json
      [MainThread] UM.PackageManager._loadManagementData [192]: Loaded user packages management file from /home/hrnick/.local/share/cura/4.9/packages.json
      [MainThread] UM.PackageManager._saveManagementData [265]: Package management file /home/hrnick/.local/share/cura/4.9/packages.json was saved
      [MainThread] UM.PluginRegistry.initializeBeforePluginsAreLoaded [117]: Loading plugin configuration file '/home/hrnick/.config/cura/4.9/plugins.json'
      Cyclic dependency detected between "file:///usr/share/cura/resources/qml/Actions.qml" and "file:///usr/share/cura/resources/qml/Actions.qml"
      QQmlApplicationEngine failed to load component
      WARNING: Cannot find style "default" - fallback: "/usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop"
      

      What strikes me as odd is that "QQmlApplicationEngine failed to load component" does not specify what component can't be loaded and I don't really know where to start troubleshooting. Someone suggested that it might be related to "something between Python and Qt and/or PyQt itself" in the Gentoo bug report I filed and that it might be worth asking the QT community for tips and help. So that's what I'm doing now.

      Have you any idea of what might be wrong or where and how I can start looking to get to the bottom with this? The Ultimaker Cura AppImage works but I would really like to figure out what's wrong here and use Cura installed through the Gentoo package manager. There seems to be at least a few other users who have run into the same problem as me.

      Bug report at bugs.gentoo.org
      Post on forums.gentoo.org

      Any help would be highly appreciated! Thanks!

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @hrnick check file:///usr/share/cura/resources/qml/Actions.qml it seems to include itself ?

      is it one of the modified files?


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      H 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @hrnick check file:///usr/share/cura/resources/qml/Actions.qml it seems to include itself ?

        is it one of the modified files?

        H Offline
        H Offline
        hrnick
        wrote on last edited by
        #3

        Thank you for your reply @J-Hilk!

        I can't see this file referring to itself in the imports. Is there another way it could refer to itself?

        $ head -n 15 /usr/share/cura/resources/qml/Actions.qml
        // Copyright (c) 2018 Ultimaker B.V.
        // Cura is released under the terms of the LGPLv3 or higher.
        
        pragma Singleton
        
        import QtQuick 2.10
        import QtQuick.Controls 1.1
        import QtQuick.Controls 2.3 as Controls2
        import UM 1.1 as UM
        import Cura 1.0 as Cura
        
        Item
        {
            property alias newProject: newProjectAction;
            property alias open: openAction;
        

        I'm not sure what you are referring to by modified file, I haven't edited any files manually, they've been installed using Gentoo's package manager.

        J.HilkJ 1 Reply Last reply
        0
        • H hrnick

          Thank you for your reply @J-Hilk!

          I can't see this file referring to itself in the imports. Is there another way it could refer to itself?

          $ head -n 15 /usr/share/cura/resources/qml/Actions.qml
          // Copyright (c) 2018 Ultimaker B.V.
          // Cura is released under the terms of the LGPLv3 or higher.
          
          pragma Singleton
          
          import QtQuick 2.10
          import QtQuick.Controls 1.1
          import QtQuick.Controls 2.3 as Controls2
          import UM 1.1 as UM
          import Cura 1.0 as Cura
          
          Item
          {
              property alias newProject: newProjectAction;
              property alias open: openAction;
          

          I'm not sure what you are referring to by modified file, I haven't edited any files manually, they've been installed using Gentoo's package manager.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @hrnick said in Cura does not start, "QQmlApplicationEngine failed to load component":

          I'm not sure what you are referring to by modified file, I haven't edited any files manually, they've been installed using Gentoo's package manager.

          oh, I'm sorry,

          I miss read your post, I thought you wanted to apply a patch the the source code and therefore needed to build the application from source. But if I understand you correctly, you just want to build it yourself, no files changed/patched ?

          where id you get your sources from, directly from GitHub?
          https://github.com/Ultimaker/Cura

          I don't think I'll be much help, pyqt is not really my forte, maybe someone else has a better idea :(


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          H 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @hrnick said in Cura does not start, "QQmlApplicationEngine failed to load component":

            I'm not sure what you are referring to by modified file, I haven't edited any files manually, they've been installed using Gentoo's package manager.

            oh, I'm sorry,

            I miss read your post, I thought you wanted to apply a patch the the source code and therefore needed to build the application from source. But if I understand you correctly, you just want to build it yourself, no files changed/patched ?

            where id you get your sources from, directly from GitHub?
            https://github.com/Ultimaker/Cura

            I don't think I'll be much help, pyqt is not really my forte, maybe someone else has a better idea :(

            H Offline
            H Offline
            hrnick
            wrote on last edited by
            #5

            @J-Hilk said in Cura does not start, "QQmlApplicationEngine failed to load component":

            oh, I'm sorry,

            No worries. :)

            I miss read your post, I thought you wanted to apply a patch the the source code and therefore needed to build the application from source. But if I understand you correctly, you just want to build it yourself, no files changed/patched ?

            where id you get your sources from, directly from GitHub?
            https://github.com/Ultimaker/Cura

            Exactly, I just want to build, install and run the Gentoo portage version of Cura without any patches. The sources is downloaded from GitHub using Gentoo's package manager (I've tried with 4.9.1 now with the same result).

            I don't think I'll be much help, pyqt is not really my forte, maybe someone else has a better idea :(

            I appreciate your help regardless, I don't know where to start and I'm happy for any help I get, thanks!

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hrnick
              wrote on last edited by
              #6

              I enabled the debug use flag for a number of packages to see if that would give any clues.

              $ cat /etc/portage/package.use/cura 
              dev-qt/qtcore debug
              dev-qt/qtxml debug
              dev-qt/qtnetwork debug
              dev-qt/qttest debug
              dev-qt/qtgui debug
              dev-qt/qtwidgets debug
              dev-qt/qtdeclarative debug
              dev-qt/qtsvg debug
              dev-qt/qtopengl debug
              dev-qt/qtquickcontrols debug
              dev-qt/qtgraphicaleffects debug
              dev-qt/qtquickcontrols2 debug
              dev-python/uranium debug
              dev-python/PyQt5 debug
              media-gfx/cura debug usb zeroconf
              

              I don't know if there's anything useful being generated but here's a link to Cura output on pastebin.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hrnick
                wrote on last edited by
                #7

                Finally some progress it seems, I've tried adding use flags to dependencies from the output. Compiling qtquickcontrols and qtquickcontrols2 with the widgets use flag got me past the QQmlApplicationEngine failed to load component message.

                $ cat /etc/portage/package.use/cura

                Debug

                dev-qt/qtcore debug
                dev-qt/qtxml debug
                dev-qt/qtnetwork debug
                dev-qt/qttest debug
                dev-qt/qtgui debug
                dev-qt/qtwidgets debug
                dev-qt/qtdeclarative debug
                dev-qt/qtsvg debug
                dev-qt/qtopengl debug
                dev-qt/qtquickcontrols debug
                dev-qt/qtgraphicaleffects debug
                dev-qt/qtquickcontrols2 debug
                dev-python/uranium debug
                dev-python/PyQt5 debug
                media-gfx/cura debug

                Removes some error messages

                media-gfx/cura usb zeroconf

                Try to find missing use flags #1, does not seem to help

                dev-qt/qtgui dbus
                dev-qt/qtwidgets gtk

                Try to find missing use flags #2, "Fatal Python error: Aborted" when starting cura

                dev-qt/qtquickcontrols widgets
                dev-qt/qtquickcontrols2 widgets

                Now I get a clear error message, "Fatal Python error: Aborted" at least.

                https://pastebin.com/wyFAxjHN

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hrnick
                  wrote on last edited by
                  #8

                  Solved it, dev-qt/qtquickcontrols needs to be build with USE="widgets". Also PyQt5 must not be built with the debug flag enabled.

                  https://github.com/Ultimaker/Cura/issues/8875

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved