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

Using a custom State-Component crashes on stateChange

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.0.1
    • None
    • qtquick2, osx 10.8.3, qt 5.0.1, qmlscene

    Description

      Imagine these two files, a State as a Component, and something using and switching the state:

      CustomState.qml
       
      import QtQuick 2.0
      
      State {
      }
      
      main.qml
      import QtQuick 2.0
      
      Rectangle {
          width: 360
          height: 360
          Text {
              id: text
              anchors.centerIn: parent
              text: "Hello World"
      
              states: CustomState {
                  id: customState
                  when: mouseArea.pressed
      
                  PropertyChanges {
                      target: text
                      rotation: 180
                  }
              }
          }
      
          MouseArea {
              id: mouseArea
              anchors.fill: parent
          }
      }
      

      When clicking on the mouse area and the state is changed, the app segfaults.

      See also statecrash.zip

      Attachments

        Activity

          People

            aalpert Alan Alpert
            hhinrich Henrik Hinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: