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

Dynamic FontLoader instantiation causes crash in some cases

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.12.8
    • GUI: Font handling
    • None
    • Ubuntu 18.04
    • Linux/X11

    Description

      Following code causes crash when click 'Load', 'Unload' and 'Load' again.

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      
      ApplicationWindow {
          width: 800
          height: 600
      
          visible: true
      
          Component {
              id: labelComponent
      
              Label {
                  FontLoader {
                      id: fontLoader
                      source: 'qrc:/awesome.otf'
                  }
      
                  font.family: fontLoader.name
                  text: '\uf06e'
              }
          }
      
          Button {
              x: 200
              visible: loader.status === Loader.Ready
      
              text: 'Unload'
              onClicked: loader.sourceComponent = null
          }
      
          Button {
              visible: loader.status !== Loader.Ready
              topPadding: pressed ? 0 : -2
              font.weight: Font.Bold
      
              contentItem: Label {
                  text: 'Load'
                  horizontalAlignment: Qt.AlignHCenter
                  verticalAlignment: Qt.AlignVCenter
              }
      
              onClicked: loader.sourceComponent = labelComponent
          }
      
          Loader {
              id: loader
              anchors.fill: parent
          }
      }
      

      Attachments

        1. backtrace.txt
          22 kB
        2. bug_report.zip
          230 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            michalc Michał Cieślak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes