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

QML crashes when using ChartView inside a reusable component that has states

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.0, 5.12.3
    • Charts
    • None
    • All

    Description

      Hi guys,

      I found that QML crashes on exit if I use a ChartView inside a reusable component that has states. See this minimal working example:

       

       

      main.qml

       

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Layouts 1.12
      import QtQuick.Controls 2.5
      import QtQuick.Controls.Material 2.3
      import QtQml 2.12
      import QtCharts 2.3
      
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
      
          CustomPage { }
      }

      MyPage.qml

       

       

      import QtQuick 2.0
      
      
      Item {
      
      
          states: [
          ]
      }
      

      CustomPage.qml

       

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Layouts 1.12
      import QtQuick.Controls 2.5
      import QtQuick.Controls.Material 2.3
      import QtQml 2.12
      import QtCharts 2.3
      
      
      MyPage {
          ChartView{
              width: 900
              height: 450
              legend.visible: false
              backgroundColor: "transparent"
      
      
              ScatterSeries {
                  id: myId
      
      
                  color: "red"
                  borderColor: "red"
                  borderWidth: 0
                  markerSize: 3
              }
          }
      }
      

      In this case, when the software is closed, it crashes. The dump can be found on the attached file. I can avoid the crash if:

      1. I remove the `id: myId` from `ScatterSeries`; or
      2. I remove the `states` from `MyPage`.

       

       

      Attachments

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

        Activity

          People

            e0348803 Miikka Heikkinen
            ronis_br Ronan Chagas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes