SlotsLayout with Column as mainSlot: endless loop when resizing view so that Column has negative width

Bug #1630167 reported by Marco Trevisan (Treviño)
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
ubuntu-ui-toolkit (Ubuntu)
Andrea Bernabei

Bug Description

With a simple code such as

import QtQuick 2.4
import Ubuntu.Components 1.3
import QtQuick.Window 2.0

Window {
    SlotsLayout {
        id: slotsLayout
        onHeightChanged: print("SlotsLayout height",height)
        width: parent.width
        mainSlot: Column {
            onHeightChanged: print("COlumn height",height)
            onWidthChanged: console.log("Column width", width)

            Rectangle {
                id: rect
                width: parent.width
                onWidthChanged: console.log("RECT WIDTH", width)
                onHeightChanged: console.log("RECT HEIGHT!", height)
                height: 5


Or something similar (, when resizing the view horizontally to only use few pixels, an infinite resizing loop starts and the view freezes.

Related branches

Revision history for this message
Andrea Bernabei (faenil) wrote :

info for my future self:
I investigated this bug a few days ago, when Trevinho first reported it directly to me.

It turns out the loop is triggered when the view is resized so that the column gets a *negative* width.

At that point you see columns height going 0 to 5 (which is rectangle's height) and back to 0, in a loop, and width going -X to 0 to -X again.

summary: - When SlotsLayout uses a Column as mainSlot and view is resized
- horizontally an inifinite resize loop starts
+ SlotsLayout with Column as mainSlot: endless loop when resizing view so
+ that Column has negative width
Andrea Bernabei (faenil)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Triaged → In Progress
Changed in ubuntu-ui-toolkit (Ubuntu RTM):
assignee: nobody → Andrea Bernabei (faenil)
importance: Undecided → Medium
status: New → In Progress
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
no longer affects: ubuntu-ui-toolkit (Ubuntu RTM)
Changed in canonical-devices-system-image:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.2141+16.10.20161013.5

ubuntu-ui-toolkit (1.3.2141+16.10.20161013.5) yakkety; urgency=medium

  [ Zsombor Egri ]
  * Do not show focus frame on ListItem when clicked. Fixes LP: #1628855
  * Fix color used to test ListItem.highlighted. Fixes LP: #1624328

  [ Christian Dywan ]
  * Don't skip the entirety of tst_textfield.11.qml. Fixes LP: #1624340

  [ Andrea Bernabei ]
  * SlotsLayout: do not set mainSlot's implicitSize, set its real size instead
    Fixes LP: #1630167.

  [ Tim Peeters ]
  * Enable proper focus handling in the scrolling ActionBar. Fixes LP: #1575893

 -- Zoltán Balogh <email address hidden> Thu, 13 Oct 2016 17:16:31 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers