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

Qt applications crash when special characters are written into QML text boxes

    XMLWordPrintable

Details

    Description

      On OSX 10.10 (Yosemite) pasting the following characters into a QML TextField with the font set to Arial will cause a segmentation fault:
      힓あ
      (note these characters need to be in NFD to reproduce the issue, this can be achieved by pasting them into a filename on OSX which will convert them to NFD, alternatively use the following UTF-8 string \xE1\x84\x92\xE1\x85\xB5\xE1\x86\xB2\xE3\x81\x82)
      The crash seems to be caused by

      QFontEngine *actualFontEngine = static_cast<QFontEngineMulti *>(fontEngine)->engine(engineIdx);
      

      returning a null pointer.
      Adding

      static_cast<QFontEngineMulti *>(fontEngine)->ensureEngineAt(engineIdx);
      

      before this call seems to fix the issue.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              alanbirtles Alan Birtles
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes