Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.15
-
None
Description
Hello,
getting a crash with the following relevant part in the stack trace thereafter.
It works fine on Windows & Linux, both with freetype and with the same font (Ubuntu).
It also works fine in the same case with the cocoa fontengine on macOS.
I am sourcing the font from a QRC, adding it with
int id = QFontDatabase::addApplicationFont(":/Ubuntu-R.ttf");
beforehand.
QFontDatabase::applicationFontFamilies(id);
prints me ("Ubuntu").
Here's the trace :
frame #8: 0x00000001082bf4cd libQt5Core_debug.5.dylib`qt_assert_x(where="Q_UNREACHABLE()", what="Q_UNREACHABLE was reached", file="/Users/jcelerier/sdk/macOS/qt5/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm", line=408) at qglobal.cpp:3362:41 frame #9: 0x000000010ead1962 libqcocoa_debug.dylib`QCoreTextFontDatabaseEngineFactory<QFontEngineFT>::fontEngine(this=0x00000001090086d0, fontDef=0x00007ffeefbf3450, usrPtr=0x0000000127f38140) at qcoretextfontdatabase.mm:408:5 frame #10: 0x0000000106f974ff libQt5Gui_debug.5.dylib`loadSingleEngine(script=2, request=0x00007ffeefbf3768, family=0x0000000109285860, foundry=0x0000000109284f40, style=0x00000001092835c0, size=0x00000001092835e0) at qfontdatabase.cpp:971:24 frame #11: 0x0000000106f92b0e libQt5Gui_debug.5.dylib`loadEngine(script=2, request=0x00007ffeefbf3768, family=0x0000000109285860, foundry=0x0000000109284f40, style=0x00000001092835c0, size=0x00000001092835e0) at qfontdatabase.cpp:1001:27 frame #12: 0x0000000106f91cf4 libQt5Gui_debug.5.dylib`QFontDatabase::findFont(request=0x00007ffeefbf38e0, script=2) at qfontdatabase.cpp:2700:18 frame #13: 0x0000000106f704aa libQt5Gui_debug.5.dylib`QFontEngineMulti::loadEngine(this=0x00000001091c5800, at=2) at qfontengine.cpp:1840:31 frame #14: 0x0000000106f70327 libQt5Gui_debug.5.dylib`QFontEngineMulti::ensureEngineAt(this=0x00000001091c5800, at=2) at qfontengine.cpp:1819:31 frame #15: 0x0000000106f70b9c libQt5Gui_debug.5.dylib`QFontEngineMulti::stringToCMap(this=0x00000001091c5800, str=0x00000001687c2d48, len=1, glyphs=0x00007ffeefbf3cc8, nglyphs=0x00007ffeefbf3cc4, flags=(i = 4)) const at qfontengine.cpp:1932:59 frame #16: 0x0000000106f9cbd4 libQt5Gui_debug.5.dylib`QTextEngine::shapeText(this=0x00007ffeefbf4560, item=0) const at qtextengine.cpp:1451:26 frame #17: 0x0000000106f9c476 libQt5Gui_debug.5.dylib`QTextEngine::shape(this=0x00007ffeefbf4560, item=0) const at qtextengine.cpp:2008:9 frame #18: 0x0000000106fc3d33 libQt5Gui_debug.5.dylib`QTextLine::layout_helper(this=0x00007ffeefbf44f8, maxGlyphs=2147483647) at qtextlayout.cpp:1845:22 frame #19: 0x0000000106fc39d5 libQt5Gui_debug.5.dylib`QTextLine::setLineWidth(this=0x00007ffeefbf44f8, width=8388607) at qtextlayout.cpp:1605:5 frame #20: 0x00000001071afa77 libQt5Gui_debug.5.dylib`qt_format_text(fnt=0x00007ffeefbf7208, _r=0x00007ffeefbf7218, tf=134760465, option=0x0000000000000000, str=0x00007ffeefbf7398, brect=0x00007ffeefbf7238, tabstops=0, ta=0x0000000000000000, tabarraylen=0, painter=0x0000000000000000) at qpainter.cpp:7675:15