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

        1. Crash_FullBacktrace.txt.zip
          453 kB
          Marscho
        2. ExampleQmlCrashAndHang.zip
          2 kB
          Marscho
        3. image-2019-02-07-15-31-02-199.png
          986 kB
          Marscho
        4. image-2019-02-07-15-34-54-925.png
          616 kB
          Marscho

        Issue Links

          For Gerrit Dashboard: QTBUG-73683
          # Subject Branch Project Status CR V

          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