Failed to get image from provider Error message seen while using the Icon component
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
Critical
|
Tim Peeters | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
I have noticed that while using the icon component in the new clock app that there is always an error message in the console about failing to get image from provider. The error is not critical since despite that message, one can still see the icon.
file://
Here is a sample app to reproduce the issue,
import QtQuick 2.0
import Ubuntu.Components 0.1
MainView {
objectName: "mainView"
application
width: units.gu(100)
height: units.gu(75)
Page {
title: i18n.tr("Simple")
Flickable {
id: mainFlickable
Icon {
id: plusIcon
}
}
}
}
So basically the add icon size change as you drag the flickable up an down. I notice the error pop up when the icon is barely visible. Try draggging the flickable up very slowly until the icon becomes really small (looks like a dot) and you should see the message pop up on the console, file://
I thought this is happening because the icon size reaches 0 at some point, however on manually setting the icon size to 0, I don't see the error.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 127 lines (+90/-8)3 files modifieddebian/control (+1/-0)
modules/Ubuntu/Components/Icon.qml (+28/-8)
tests/unit_x11/tst_components/tst_icon.qml (+61/-0)
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → Critical |
assignee: | nobody → Tim Peeters (tpeeters) |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
it happens when the icon size is 1. I added some debugging output and see this:
qml: icon height = 5 /home/tim/ dev/ubuntu- ui-toolkit/ m/iconFix/ modules/ Ubuntu/ Components/ Icon.qml: 85:5: QML Image: Failed to get image from provider: image://theme/add /home/tim/ dev/ubuntu- ui-toolkit/ m/iconFix/ modules/ Ubuntu/ Components/ Icon.qml: 85:5: QML Image: Failed to get image from provider: image://theme/add /home/tim/ dev/ubuntu- ui-toolkit/ m/iconFix/ modules/ Ubuntu/ Components/ Icon.qml: 85:5: QML Image: Failed to get image from provider: image://theme/add
qml: icon height = 4
qml: icon height = 3
qml: icon height = 2
qml: icon height = 1
file://
qml: icon height = 0
qml: icon height = 1
qml: icon height = 2
qml: icon height = 1
file://
qml: icon height = 0
qml: icon height = 1
qml: icon height = 2
qml: icon height = 1
file://
qml: icon height = 0
qml: icon height = 1
qml: icon height = 2
qml: icon height = 3
qml: icon height = 4
qml: icon height = 5
the result does not seem to depend the value of GRID_UNIT_PX.