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

A property alias for a property alias leads to a segfault in QQmlPropertyCacheAliasCreator<QV4::ExecutableCompilationUnit>::propertyDataForAlias()

    XMLWordPrintable

Details

    • 487bd23 (dev), 3d454ca (6.5), 71f7338 (6.6)

    Description

       

      Since Qt 6.5, caching for alias properties that point to another alias property leads to a segfault during startup (or an assert for a debug build):

      ASSERT: "targetProperty" in file /path/to/qt/include/QtQml/6.5.2/QtQml/private/../../../../../../../qt5/qtdeclarative/src/qml/qml/qqmlpropertycachecreator_p.h, line 838
      

      The first startup always works, as does starting with QML_DISABLE_DISK_CACHE=1.

      This breaks one of the Qt OPC UA examples (see QTBUG-115088).

      I can reproduce the issue by putting this nested item structure into a Window:

      Item {
          Item {
              id: foo
              readonly property alias myAlias: bar.prop
              
              Item {
                  id: bar
                  
                  Item {
                      id: baz
                      readonly property bool value: true
                  }
      
                  readonly property alias prop: baz.value
              }
          }
      }

       

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              basyskom.jannis.voelker Jannis Völker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes