Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126474

QQuickLayout Recursive Rearrange Locks Application

    XMLWordPrintable

Details

    • Windows
    • c9e235a63 (dev), 798fcfc40 (6.8), 4f69583aa (6.7), 83cbafbe3 (tqtc/lts-6.5)

    Description

      I ran in to a situation where a QQuickLayout was being set incorrectly and causing a recursive update. The layout configuration used in the attached example is nonsensical, but I'm reporting it so that the recursive rearrange protection could be improved to handle the edge case.

      ColumnLayout {
          id: columnLayout        
      
          Rectangle {
              id: rectangle1
          }        
      
          Rectangle{
              id: rectangle2
              Layout.minimumHeight: columnLayout.height
          }
      } 

      In the minimum reproducible case, a ColumnLayout is trying to determine its size from two child Rectangles. One of the Rectangles is set to have the minimumHeight of the parent ColumnLayout's height. This causes a recursive loop and the following error messages are displayed repeatedly:

      Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
      Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
      qrc:/LayoutLockingMainThread/Main.qml:10:5: QML ColumnLayout: Layout polish loop detected for QQuickColumnLayout(0x159937e9a00, id="columnLayout", parent=0x1599379e750, geometry=0,0 0x217280). Aborting after two iterations.

      The application becomes unresponsive when this occurs.

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              piwierci Piotr Wierciński
              tvoils Thomas Voils
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes