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 crashes on startup "Type UM.SimpleButton unavailable" #15524

Closed
1 of 2 tasks
TahaAbbasi-Hashemi opened this issue May 15, 2023 · 9 comments · Fixed by Ultimaker/Uranium#874
Closed
1 of 2 tasks

Cura crashes on startup "Type UM.SimpleButton unavailable" #15524

TahaAbbasi-Hashemi opened this issue May 15, 2023 · 9 comments · Fixed by Ultimaker/Uranium#874
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

@TahaAbbasi-Hashemi
Copy link

Application Version

cura version: 5.2.2

Platform

Alpine Linux

Printer

Not applicable

Reproduction steps

  1. Ran the command "cura" in the terminal. At which point the program crashes

Actual results

The error message comes in the terminal

"2023-05-15 00:41:27,784 - ERROR - [MainThread] UM.Qt.QtApplication.createQmlComponent [616]: file:///usr/lib/cura/plugins/ModelChecker/ModelChecker.qml:8:1: Type UM.SimpleButton unavailable
2023-05-15 00:41:27,785 - ERROR - [MainThread] UM.Qt.QtApplication.createQmlComponent [616]: file:///usr/lib/python3.11/site-packages/UM/Qt/qml/UM/SimpleButton.qml:30:5: ColorImage is not a type"

Expected results

Cura should open

Checklist of files to include

  • Log file
  • Project file

Additional information & file uploads

cura.log

@TahaAbbasi-Hashemi TahaAbbasi-Hashemi added Status: Triage This ticket requires input from someone of the Cura team Type: Bug The code does not produce the intended behavior. labels May 15, 2023
@vanitasvitae
Copy link

vanitasvitae commented May 15, 2023

I'm having the same issue on Fedora 38 with Cura 5.3.0.

Edit: Apparently the 5.3.1 AppImage from Github works fine, so this might be a packaging issue?

@nallath
Copy link
Member

nallath commented May 15, 2023

Sounds a lot like a packaging issue. I've seen those errors before on my local dev env from source.

@MariMakes
Copy link
Contributor

Hey @TahaAbbasi-Hashemi,

Thanks for your report 👍
I'll bring it up to the team to see what they can do to improve it.
Fingers crossed 🤞

@MariMakes MariMakes added Status: Under Investigation The issue has been confirmed or is assumed to be likely to be a real issue. It's pending discussion. and removed Status: Triage This ticket requires input from someone of the Cura team labels May 19, 2023
@rosbergrodrigues
Copy link

rosbergrodrigues commented May 20, 2023

I'm using Fedora 38, and having same problem.
Waiting for solution. too ;)

PS: Installed by dnf package manager
appimage, opens (excecute) and not show main window

@fieldOfView
Copy link
Collaborator

That ColorImage on line 30 of .../site-packages/UM/Qt/qml/UM/SimpleButton.qml should probably be UM.ColorImage. And there should be an import UM 1.5 as UM statement near the top of the file.

Strange that it crashes for you (as it should) but not for the majority of users.

@rosbergrodrigues
Copy link

That ColorImage on line 30 of .../site-packages/UM/Qt/qml/UM/SimpleButton.qml should probably be UM.ColorImage. And there should be an import UM 1.5 as UM statement near the top of the file.

Strange that it crashes for you (as it should) but not for the majority of users.

Yeah!
I edited the file:

sudo nano -c /usr/lib/python3.11/site-packages/UM/Qt/qml/UM/SimpleButton.qml

1- add "import UM 1.5 as UM"
2 - add "UM." on ColorImage

// Copyright (c) 2018 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher.

import QtQuick 2.1
import UM 1.5 as UM

MouseArea
{
id: base

hoverEnabled: true

property color color: "black"
property color hoverColor: color
property color backgroundColor: "transparent"
property color hoverBackgroundColor: backgroundColor
property alias iconSource: image.source
property real iconMargin: 0

property alias hovered: base.containsMouse
property alias backgroundRadius: background.radius

Rectangle
{
 	id: background
    anchors.fill: parent
    color: base.containsMouse ? base.hoverBackgroundColor : base.backgroundColor
    radius: 0
}

UM.ColorImage
{
 	id: image
    anchors.fill: parent
    anchors.margins: base.iconMargin
    color: base.containsMouse ? base.hoverColor : base.color
    visible: source != ""
}

}

And it Works!! Thank you so much

One more doubt, would i, add UM. on Rectangle line too??

@fieldOfView
Copy link
Collaborator

Thanks for testing. I will make a pull request so this fix can be incorporated in the next release.

Rectangle is a standard QML element, or actually part of the QtQuick package. ColorImage is defined by the Uranium package, which is imported as UM. That's why ColorImage should be prefixed with the UM class.

@fieldOfView
Copy link
Collaborator

See Ultimaker/Uranium#874

@MariMakes MariMakes 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 22, 2023
@MariMakes
Copy link
Contributor

giphy (7)

I'm loving the troubleshooting here.
Thanks for the fix @fieldOfView
Very awesome ✨

I've added it to the queue to be reviewed soon.
For internal reference CURA-10614

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

Successfully merging a pull request may close this issue.

6 participants