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

Crash in QTreeWidgetItem::sortChildren when adding new item.

    XMLWordPrintable

Details

    Description

      When appending new item to QTreeWidgetItem the application crashes to QTreeWidgetItem::sortChildren function (test application attached). The crash occurs in qitemselectionmodel.cpp indexesFromRange(const QItemSelectionRange &range, QModelIndexList &result) function. When debugging the issue it gives a following warning by operating system when it crashes:

      Signal received
      The inferior stopped because it received a signal from the Operating System.
      Signal name: SIGSEGV
      Signal meaning: Segmentation fault

      Workaround fix for this is to call setSortingEnabled(true) every time when inserting a new item. In Qt documentation there is a note about this and it says that serSortingEnabled can help you to avoid performance issues. But it shouldn't crash when leaving sorting to false.

      Attachments

        1. QTBUG20345.tgz
          1 kB
        2. treew.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            maheikki Markku Tapio Heikkilä (Inactive)
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes