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

QSortFilterProxyModel crash when dataChanged during setFilter*

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4: Low P4: Low
    • 6.9.1, 6.10.0 FF
    • 5.5.1, 5.10.1
    • Widgets: Itemviews
    • None
    • not applicable
    • 687422abd (dev), ab628edbb (6.9)

      If QSortFilterProxyModel::setFilter* removes an item which was selected, the beginRemoveRows in QSortFilterProxyModelPrivate::remove_proxy_interval triggers a QItemSelectionModel::selectionChanged. If in response to that dataChanged is called on the source model, QSortFilterProxyModelPrivate::remove_proxy_interval is called again and when the stack returns to the first invocation, the proxy intervals are not valid anymore.

      tl;dr: changing the source model due to signals emitted during setFilter* crashes

        1. CMakeLists.txt
          1.0 kB
          Norbert Pfeiler
        2. debug crash backtrace.txt
          3 kB
          Norbert Pfeiler
        3. debug problem backtrace.txt
          5 kB
          Norbert Pfeiler
        4. main.cpp
          2 kB
          Norbert Pfeiler
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dfaure_kdab David Faure
            darklighter Norbert Pfeiler
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes