Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1, 5.10.0 Beta 3, 5.10.0 RC
-
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