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

QSortFilterProxyModel: Crash when changing sourceModel (QPropertyBindingData / QBindingStorage)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8.2
    • Core: Item Models
    • None
    • Windows

    Description

      With a specific setup calling QSortFilterProxyModel::setSourceModel will cause a crash with the following callstack:

      With a spesific setup calling QSortFilterProxyModel::setSourceModel will cause a crash with the following callstack:                                                                                                                                                                                        
      1   QtPrivate::QPropertyBindingData::d                       qpropertyprivate.h        308  0x7ffc107abef4 
      2   QtPrivate::QPropertyBindingData::binding                 qpropertyprivate.h        265  0x7ffc107a8fd4 
      3   QPropertyBindingDataPointer::binding                     qproperty_p.h             75   0x7ffc108f4a57 
      4   QPropertyBindingDataPointer::firstObserver               qproperty_p.h             470  0x7ffc108f4ee9 
      5   QObjectCompatProperty<QAbstractProxyModelPrivate,QAbs .. qproperty_p.h             666  0x7ffc10f4d0da 
      6   QAbstractProxyModel::setSourceModel                      qabstractproxymodel.cpp   213  0x7ffc10f48305 
      7   QSortFilterProxyModel::setSourceModel                    qsortfilterproxymodel.cpp 2054 0x7ffc10f676ae 
      8   ProxyModel::toogleSource                                 proxymodel.cpp            24   0x7ff661716513 
      

                                                                  
      Attached an example that can reproduces this.

      Some notes:
      In Mail.qml if "objectName: model.display" is removed the crash does not happen
      In ProxyModel::toogleSource() if you clear sourceModel and filterFixedString before changing source the crash does not happen

      Attachments

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

        Activity

          People

            ivan.solovev Ivan Solovev
            anders.bugge.gehc Anders Bugge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes