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

QTextEdit causes Q_ASSERT when insert four char combination

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.4.0, 5.4.1, 5.5.0 Alpha
    • None
    • Windows 8.1 x64

    Description

      I tried to add random char combination to QTextEdit and found this case:

      #include <QApplication>
      #include <QTextEdit>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          wchar_t* errWstring = L"\u065b" L"\u05a6" L"\u0cf9" L"\u0311";
          QString errString = QString::fromWCharArray(errWstring, 4);
          QTextEdit te;
          te.textCursor().insertHtml(errString);
          te.show();
          return a.exec();
      }
      

      The code above causes Q_ASSERT in qtextlayout.cpp at line 1695:

      Q_ASSERT((pos == end && glyphPosition == current.num_glyphs) || logClusters[pos] == glyphPosition);
      

      I suspect 3rd character. I also tried to use 'cf7', 'cf6', 'dfa', 'efa', 'ffa' insted with the same result (i mean Q_ASSERT).

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            yuri_q Yuri M
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes