Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.3, 4.7.2, 4.7.3, 4.8.0
-
Windows 7, Linux
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.