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

Recursion in QtFontEngine for Qt 5.9.1/5.10

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.2
    • 5.9.1, 5.10.0 Beta 3, 5.10.0 RC
    • GUI: Font handling
    • None
    • on Arch Linux:
       - systemsettings 5.10.4-1
       - kscreen 5.10.4-1
       - libkscreen 5.10.4-1
       - qt5-base 5.9.1-3
       - freetype2 2.8-2

    Description

      This bug is very likely related to https://bugreports.qt.io/browse/QTBUG-60697

      It seems there's still recursion happening in QtFontEngine when trying to call alphaMapForGlyph on 'space' character, reproducible by:

      #include <QRawFont>
      #include <QtGui/QGuiApplication>
      #include <QtGui/QImage>
      #include <QtCore/QDebug>
      int main(int argc,char **argv)
      {
       QGuiApplication app(argc,argv);
       QRawFont fnt(QString("font.ttf"),9,QFont::PreferDefaultHinting);
       QString str=" ";
       auto glyph_indexes = fnt.glyphIndexesForString(str);
       auto img=fnt.alphaMapForGlyph(glyph_indexes[0],QRawFont::PixelAntialiasing);
       return 0;
      }

      The stack trace looks like this:

       

       
      #0  0x00007f112f514dd0 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #1  0x00007f112f515327 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #2  0x00007f112f5174c9 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #3  0x00007f112f50ee02 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #4  0x00007f112f517973 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #5  0x00007f11370721a7 in QFontEngine::alphaMapForGlyph(unsigned int, QTransform const&) () from /usr/lib/libQt5Gui.so.5 
      #6  0x00007f1137072a41 in QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&) () from /usr/lib/libQt5Gui.so.5 
      #7  0x00007f112f5175f7 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #8  0x00007f112f50ee02 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #9  0x00007f112f517973 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #10 0x00007f11370721a7 in QFontEngine::alphaMapForGlyph(unsigned int, QTransform const&) () from /usr/lib/libQt5Gui.so.5 
      #11 0x00007f1137072a41 in QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&) () from /usr/lib/libQt5Gui.so.5 
      #12 0x00007f112f5175f7 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #13 0x00007f112f50ee02 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #14 0x00007f112f517973 in ?? () from /usr/lib/libQt5XcbQpa.so.5 
      #15 0x00007f11370721a7 in QFontEngine::alphaMapForGlyph(unsigned int, QTransform const&) () from /usr/lib/libQt5Gui.so.5 
      #16 0x00007f1137072a41 in QFontEngine::alphaMapForGlyph(unsigned int, QFixed, QTransform const&) () from /usr/lib/libQt5Gui.so.5
      
      

       

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            nemerle Artur K.
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes