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

QML TextEdit crash with long text

    XMLWordPrintable

Details

    • c0772f44fb1d53608ff629fc622103698c6d0ee5

    Description

      STEPS TO REPRODUCE:

      • Run QmlViewer on device
      • Open snippet-textedit.qml
      • Press ok to close virtual keyboard
      • Scroll down and tap on text to open virtual keyboard again
      • Press ok

      --> Crashes and QmlViewer exits

      Crash happens in QTextEngine::getClusterLength (see crash logs in attachments for full call stack)

      // Scan in logClusters[from..to-1] for glyph_pos
      int QTextEngine::getClusterLength(unsigned short *logClusters,
                                        const HB_CharAttributes *attributes,
                                        int from, int to, int glyph_pos, int *start)
      {
          int clusterLength = 0;
          for (int i = from; i < to; i++) {
              if (logClusters[i] == glyph_pos && attributes[i].charStop) {  // <-- crashes as logClusters is an invalid pointer
                  if (*start < 0)
                      *start = i;
                  clusterLength++;
              }
              else if (clusterLength)
                  break;
          }
          return clusterLength;
      }
      

      The crash is reproducable on desktop environments as well, thought not with the minimal code sample of snippet-textedit.qml. With Symbians virtual keyboard this crash is particurally easy to reproduce.

      The origin for this issue is http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-830

      Attachments

        1. crash_log_desktop.txt
          4 kB
        2. crash_log_device.txt
          19 kB
        3. snippet-textedit.qml
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jaakkorp Jaakko Korpela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes