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

QML - RowLayout + Text with WrapAtWordBoundaryOrAnywhere hangs/crashes on changing width

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • 5.12.0, 5.12.1
    • None
    • Fedora 28 64Bit / GCC 8.2.1
      iPhone 8 / iOS 12.0 / ios SDK 12.1
    • iOS/tvOS/watchOS, Linux/X11
    • Shovelling Snow

    Description

      In this example there is two Text items in a RowLayout. The RowLayout has the width of the window. The Text items are set to Layout.fillWidth: true and to wrapMode: Text.WrapAtWordBoundaryOrAnywhere. If you slowly change the width of the window at some point the UI will stop refreshing or the application crashes. Depending on the set text of the Text items.

      I first ran into this problem on iOS by luck(no changing width of the window on iOS). But I could easily reproduce the issue on Linux and I think this can occure anywhere.

       
      Example 1 - UI hangs:

      RowLayout{
          width: parent.width
          Text{
              Layout.fillWidth: true
              text: "123456 12345678901234 123"   //- Case 1: Window freezes and never(?) updates again
              wrapMode: Text.WrapAtWordBoundaryOrAnywhere
          }
          Text{
              Layout.fillWidth: true
              text: "1234 12345678901234 123"     //- Case 1: Window freezes and never(?) updates again
              wrapMode: Text.WrapAtWordBoundaryOrAnywhere
          }
      }
      

       

      Example 2 - App crashes:

      RowLayout{
          width: parent.width
          Text{
              Layout.fillWidth: true
              text: "OneWord"                     //- Case 2: App crashes
              wrapMode: Text.WrapAtWordBoundaryOrAnywhere
          }
          Text{
              Layout.fillWidth: true
              text: "OneWord"                     //- Case 2: App crashes
              wrapMode: Text.WrapAtWordBoundaryOrAnywhere
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              smd Jan Arve
              Marscho Marscho
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes