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

memory corruption in QAbstractItemView when editor state changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 4.8.1, 4.8.2
    • Widgets: Itemviews
    • None
    • All operating systems
    • f37d3e2cd9aae156dc58a0e9f057e78dadda7b93

    Description

      The method QAbstractItemViewPrivate::updateEditorData loops over a list of editors in indexEditorHash. This list can possibly change during the loop. In case of such change, the iterator over the list becomes corrupt and loops until a segfault happens.

      A possible case in which this happens is when an editor changes its state based on its value. For example an editor that becomes disabled when a certain value is set. If this value is then set in the loop, the editor becomes disabled, which triggers the opening of another editor in the subsequent field. This new editor is thus appended to the indexEditorHash which corrupts the iterator.

      Attachments

        1. qabstractitemview-crash.png
          qabstractitemview-crash.png
          83 kB
        2. QTBUG-25370_testCase.zip
          1 kB
        3. test_qt.py
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            erikjans Erik Janssens
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes