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

Using a custom State-Component crashes on stateChange

XMLWordPrintable

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

      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

        1. statecrash.zip
          1.0 kB
          Henrik Hinrichs
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes