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

Stack overflow when QWindowsFontDatabase::populateFamily process familyName "PingFang"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.6, 5.15.9
    • GUI: Font handling
    • None
    • windows 10
    • Windows

    Description

      Install mutiple font PingFang in operate system, the app will crash by stack overflow.

      It seems like cross call EnumFontFamiliesEx with different font but has same tag, then exhaust stack.The familyName‘s value set to "蘋方-簡","PingFang SC" alternately.

      Qt 5.12.5 runs well, but 5.15.6 & 5.15.9 both failed.

      The fonts can find in attachment.

      Call stack :

           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知
           qwindows.dll!QWindowsFontDatabase::populateFamily(const QString & familyName) 行 1202    C++
           qwindows.dll!addFontToDatabase(QString familyName, QString styleName, const tagLOGFONTW & logFont, const tagTEXTMETRICW * textmetric, const tagFONTSIGNATURE * signature, int type, `anonymous-namespace'::StoreFontPayload * sfp) 行 1119    C++
           qwindows.dll!storeFont(const tagLOGFONTW * logFont, const tagTEXTMETRICW * textmetric, unsigned long type, __int64 lparam) 行 1169    C++
           gdi32full.dll!00007ff842e33bf1()    未知
           gdi32full.dll!00007ff842e33a94()    未知

      ...

      Attachments

        1. Fonts.7z
          12.93 MB
          Fros Mourne

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              fmt Fros Mourne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes