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

QQuickStateGroup taking null pointers leads to crash

XMLWordPrintable

    • All
    • 7ce3ce41b (dev), 42a1ab50c (6.7), 787e794af (6.6), 16a0bea03 (tqtc/lts-6.5)

      Since Qt 6.5.3, QQuickStateGroup no longer ignores appending null pointers to its states property. However, QQuickStateGroup::componentComplete() performs actions on the states objects without null checks. It doesn't even use asserts. This causes crashes which are really hard do analyze.

      This issue appeared after switching to Qt 6.5.3 due to a QML binding with a type mismatch.

      The following is the minimum scenario to reproduce the issue:

      Item{
          states: ["test"]
      } 

      In Qt 6.5.2 this has been simply ignored. There wasn't even a warning.

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

            ulherman Ulf Hermann
            docjambi Peter Droste
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes