为什么加载字体时Qt App挂起?

时间:2019-02-04 15:11:00

标签: macos qt qt5

在MacOS 10.13(High Sierra)中,我无法打开自己构建的QT应用程序。

应用程序挂起,并带有以下堆栈跟踪:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff7631420a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff76313768 libsystem_kernel.dylib`mach_msg + 128
    frame #2: 0x00007fff4c60014c ATS`SendFontManagementMessageWithMessageStatus + 181
    frame #3: 0x00007fff4c600025 ATS`RendezvousWithServer(char*) + 328
    frame #4: 0x00007fff4c5ffe23 ATS`NewHookUpWithATSServer(unsigned char) + 386
    frame #5: 0x00007fff4c5ff8aa ATS`FOLazyInitialize + 441
    frame #6: 0x00007fff4c636079 ATS`ATSFontNotify + 32
    frame #7: 0x0000000119cfe140 libqcocoa.dylib`QCoreTextFontDatabase::removeApplicationFonts() + 880
    frame #8: 0x0000000119cfdb36 libqcocoa.dylib`QCoreTextFontDatabase::populateFontDatabase() + 22
    frame #9: 0x0000000109735495 QtGui`initializeDb() + 53
    frame #10: 0x00000001097360dc QtGui`QFontDatabase::findFont(int, QFontPrivate const*, QFontDef const&, bool) + 92
    frame #11: 0x00000001097385be QtGui`QFontDatabase::load(QFontPrivate const*, int) + 2750
    frame #12: 0x0000000109716675 QtGui`QFontPrivate::engineForScript(int) const + 229
    frame #13: 0x00000001097439d8 QtGui`QScriptLine::setDefaultHeight(QTextEngine*) + 200
    frame #14: 0x0000000109750676 QtGui`QTextLine::layout_helper(int) + 678
    frame #15: 0x000000010975037d QtGui`QTextLine::setLineWidth(double) + 237
    frame #16: 0x000000010978c9cc QtGui`QTextDocumentLayoutPrivate::layoutBlock(QTextBlock const&, int, QTextBlockFormat const&, QTextLayoutStruct*, int, int, QTextBlockFormat const*) + 2428
    frame #17: 0x00000001097873a5 QtGui`QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::iterator, QTextLayoutStruct*, int, int, QFixed) + 4277
    frame #18: 0x000000010978bdec QtGui`QTextDocumentLayoutPrivate::layoutFrame(QTextFrame*, int, int, QFixed, QFixed, QFixed) + 1228
    frame #19: 0x000000010978b8f7 QtGui`QTextDocumentLayoutPrivate::layoutFrame(QTextFrame*, int, int, QFixed) + 583
    frame #20: 0x000000010978e0d5 QtGui`QTextDocumentLayout::doLayout(int, int, int) + 149
    frame #21: 0x000000010978dc08 QtGui`QTextDocumentLayout::documentChanged(int, int, int) + 696
    frame #22: 0x00000001097617d0 QtGui`QTextDocument::documentLayout() const + 64
    frame #23: 0x0000000109d50b4a QtWidgets`QWidgetTextControlPrivate::_q_documentLayoutChanged() + 26
    frame #24: 0x0000000109d5063e QtWidgets`QWidgetTextControlPrivate::setContent(Qt::TextFormat, QString const&, QTextDocument*) + 174
    frame #25: 0x0000000109d5050b QtWidgets`QWidgetTextControlPrivate::init(Qt::TextFormat, QString const&, QTextDocument*) + 27
    frame #26: 0x0000000109d5226f QtWidgets`QWidgetTextControl::QWidgetTextControl(QObject*) + 95
    frame #27: 0x0000000109d32687 QtWidgets`QTextEditPrivate::init(QString const&) + 55
    frame #28: 0x0000000109d3380e QtWidgets`QTextEdit::QTextEdit(QTextEditPrivate&, QWidget*) + 62
    frame #29: 0x0000000109d3a10e QtWidgets`QTextBrowser::QTextBrowser(QWidget*) + 142

我知道在加载系统字体时存在一些问题。但是,无法找出解决方案。有人可以帮忙吗?

0 个答案:

没有答案