Binding loop detected when changing backgroundColor of MainView dynamically

Bug #1213043 reported by Martin Borho
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Sudoku App
Triaged
Medium
Unassigned
Ubuntu Weather App
Fix Released
High
Martin Borho
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Zsombor Egri
Vivid
New
Undecided
Unassigned

Bug Description

When changing the backgroundColor of MainView programmatically, a binding loop occurs:

file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:192:5: QML StyledItem: Binding loop detected for property "style"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml:62:5: QML Binding: Binding loop detected for property "target"

Related branches

Changed in ubuntu-weather-app:
importance: Undecided → High
Revision history for this message
Tim Peeters (tpeeters) wrote :

Could you please include a simple test program that exposes the issue? Thanks!

Revision history for this message
Martin Borho (martin-borho) wrote :

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the .desktop filename
    applicationName: "gradientbug"
    backgroundColor: "#010101"
    width: units.gu(25)
    height: units.gu(25)

    Page {
        title: i18n.tr("Simple")

        Button {
            objectName: "button"
            width: parent.width

            text: i18n.tr("Tap me!")

            onClicked: {
                backgroundColor = "#FCFCFC"
            }
        }
    }
}

Revision history for this message
Martin Borho (martin-borho) wrote :

Should just display nice the binding loop errors.

Cheers
Martin

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
assignee: nobody → Florian Boucault (fboucault)
Changed in sudoku-app:
importance: Undecided → Medium
David Planella (dpm)
Changed in ubuntu-weather-app:
status: New → Triaged
David Planella (dpm)
Changed in sudoku-app:
status: New → Triaged
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: Florian Boucault (fboucault) → Zsombor Egri (zsombi)
Revision history for this message
Brad Wells (brad-4) wrote :

This bug seems to occur when changing from a dark theme to a light theme. The background color can be changed without errors if isLight of MainViewStyle does not have to toggle.

On devices, there is a bigger issue if the background color change is triggered from a hud action. In this case, going from light to dark causes the app to hang in a transition state.

Revision history for this message
Martin Borho (martin-borho) wrote :

Fixed for weather app, since three different colours are used for the gradient background.

Changed in ubuntu-weather-app:
assignee: nobody → Martin Borho (martin-borho)
status: Triaged → Fix Released
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
status: New → Confirmed
Zsombor Egri (zsombi)
no longer affects: ubuntu-ui-toolkit
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.1.1364+15.04.20141209-0ubuntu1

---------------
ubuntu-ui-toolkit (1.1.1364+15.04.20141209-0ubuntu1) vivid; urgency=medium

  [ Zsombor Egri ]
  * Theming fixes: application theming, binding loop fix, auto-theming
    moved into MainView and it is applicable only on Ambiance and
    SuruDark, SuruGradient is no longer auto-themed.
    Fixes: LP: #1213043, LP: #1277647, LP: #1330510, LP: #1356779,
           LP: #1389792.
  * ServiceProperties component to Ubuntu.Components 1.1.
    Fixes: LP: #1391877.
  * New ListItem component base. Support for leading/trailing actions.
    Exported in Ubuntu.Components 1.2 UNSTABLE release.
    Fixes: LP: #1097728, LP: #1372592, LP: #1383870.
  * removing failing ServiceProperties and app-theming branches
  * Application theming ant other theming related binding loop fixes
  * ServiceProperties DBus property watcher

  [ Christian Dywan ]
  * Do the default theme check properly: for non-debug and without
    build errors.
  * Don't activate the control in ListItem.Standard implicitly.
    Fixes: LP: #1372563.
  * Improve AutoPilot caret dragging test cases.
  * Use new qt_gl_set_global_share_context setter with Qt 5.4.
    Fixes: LP: #1397979.
  * Add sortCaseSensitivity to the SortFilterModel example.
    Fixes: LP: #1391034.
  * Change offending links into bold font. Fixes: LP: #1395011.

  [ Daniel d'Andrada ]
  * This is needed by unity8 for the "shell rotation" feature (ie
    shell does all the rotation work instead of apps rotating
    themselves). unity8's dialogs (like the power dialog when you
    long press the power button) should follow its parent item
    rotation and size, as one would expect, and not be sneakily
    reparented to the scene root item, in which case the shell
    UI would be rotated but its dialog would not.
    Related bug LP: #1394511. Fixes: LP: #1394511.

  [ Tim Peeters ]
  * Remove the old header separator style. Fixes: LP: #1372590.

  [ Loïc Molinari ]
  * Made the UCAlarmPrivate destructor private.

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Tue, 09 Dec 2014 11:47:33 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Released
Zsombor Egri (zsombi)
no longer affects: ubuntu-ui-toolkit (Ubuntu RTM)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.