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

QML application crash when using FontLoader with some ttf fonts

    XMLWordPrintable

Details

    Description

      The following code works for a lot of TTF fonts, but with some the application crashes with a SIGSEGV.

       

      import QtQuick 2.9
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Font test")
      
          FontLoader{
              id: floader
              source: "file:///opt/fonts/danielbk.ttf"
          }
          Text{
              anchors.centerIn: parent
              text: floader.name
              font.family: floader.name
          }
      }
      

      With GDB:

      1   ??                                                                       0x7fffef0b42f3
      2   ??                                                                       0x7fffef087fec
      3   ??                                                                       0x7fffef08962f
      4   ??                                                                       0x7fffef08f644
      5   FT_Load_Glyph                                                            0x7fffef07883b
      6   ??                                                                       0x7fffef0bdd81
      7   FT_Load_Glyph                                                            0x7fffef078a45
      8   ??                                                                       0x7fffef62b78c
      9   ??                                                                       0x7fffef62e27a
      10  ??                                                                       0x7fffef630080
      11  ??                                                                       0x7fffef6282ee
      12  QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&)   0x7ffff77cda8f
      13  ??                                                                       0x7fffef6301f8
      14  ??                                                                       0x7fffef6282ee
      15  QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&)   0x7ffff77cda8f
      16  ??                                                                       0x7fffef6301f8
      17  ??                                                                       0x7fffef6282ee
      18  QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&)   0x7ffff77cda8f
      19  ??                                                                       0x7fffef6301f8
      20  ??                                                                       0x7fffef6282ee
      ... <plus>  (repeat this lines more than 5000 times)                                                                                
      

      This font works normally using QFontDatabase and QLabel.

      Attachments

        1. danielbk.ttf
          87 kB
          Leo Baudouin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            lbaudouin Leo Baudouin
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes