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

Qt6Gui!QWindowsFontDatabase::populateFamily call with stack overflow crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.2.0, 6.2.1, 6.2.2
    • GUI: Font handling
    • None
    • window10 or macOS
    • Windows

    Description

      Qt6Gui!storeFont+0x192
      gdi32full!EnumFontsInternalW+0x149
      gdi32full!EnumFontFamiliesExW+0x44
      Qt6Gui!QWindowsFontDatabase::populateFamily+0x183 
      Qt6Gui!addFontToDatabase+0x5dd                                       //qt6.2.1:  line 600
      Qt6Gui!storeFont+0x192
      gdi32full!EnumFontsInternalW+0x149
      gdi32full!EnumFontFamiliesExW+0x44
      Qt6Gui!QWindowsFontDatabase::populateFamily+0x183
      Qt6Gui!QtFontFamily::ensurePopulated+0x31 (Inline Function @ 00007ff9`610da750)
      Qt6Gui!match+0x390
      Qt6Gui!QFontDatabasePrivate::findFont+0x292
      Qt6Gui!QFontDatabasePrivate::load+0x945
      Qt6Gui!QFontPrivate::engineForScript+0x96
      Qt6Gui!QFontMetricsF::height+0x17
      Qt6Quick!QQuickTextPrivate::lineHeightOffset+0x2b
      Qt6Quick!QQuickText::contentHeight+0x11 (Inline Function @ 00007ff9`7a05c133)
      Qt6Quick!QQuickTextPrivate::updateSize+0x123
      Qt6Quick!QQuickTextPrivate::updateLayout+0x4ab
      Qt6Qml!QQmlObjectCreator::finalize+0x65d
      Qt6Qml!QQmlIncubatorPrivate::incubate+0x7da
      Qt6Qml!QQmlEnginePrivate::incubate+0x266
      Qt6Qml!QQmlComponent::create+0x1ce
      Qt6Quick!QQuickLoaderPrivate::_q_sourceLoaded+0x217
      Qt6Quick!QQuickLoader::componentComplete+0x3c
      Qt6Qml!QQmlObjectCreator::finalize+0x65d
      Qt6Qml!QQmlComponentPrivate::complete+0x49
      Qt6Qml!QQmlComponentPrivate::completeCreate+0x1d7
      Qt6Qml!QQmlComponent::create+0x8f

       

      crash details:

              when font database load system fonts,  it will touch stack overflow crash if meeting special system font like chinese ‘萍方’ fonts under window

       

      crash touch:

      1. unzip the attached files “萍方字体_part1.7z”, “萍方字体_part2.7z” to c:\windows\fonts

      2. run any simple demo, create qml componet control to loading system fonts

       

       

      Attachments

        1. image-2022-01-10-19-11-20-213.png
          image-2022-01-10-19-11-20-213.png
          337 kB
        2. PingFang-SC-Regular.otf
          10.26 MB
        3. PingFang 简粗.ttf
          10.42 MB
        4. 萍方字体__part1.7z
          17.15 MB
        5. 萍方字体__part2.7z
          11.86 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            husoul soul hu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes