[QTBUG-24337] QAbstractListModel crashes on endMoveRows() (ASSERT: "!this->isEmpty()") Created: 17 Feb '12  Updated: 21 Feb '12  Resolved: 21 Feb '12

Status: Closed
Project: Qt
Component/s: Core: Object Model
Affects Version/s: 4.8.0
Fix Version/s: None

Type: Bug Priority: Not Evaluated
Reporter: Fabian Beutel Assignee: Earth Domain (Inactive)
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Windows 7 64bit, Qt4.8, QtCreator, MSVC

Attachments: Text File main.cpp    



when using beginMoveRows() and endMoveRows() of QAbstractListModel, endMoveRows() causes the program to crash in debug mode.
The attached code should demonstrate the crash (only debug mode of course).

Following error is thrown:
Debug Error!
Program: ...for_Desktop-MSVC2010Qt_SDK_Debug\debug\ItemMoveTest.exe
Module: 4.8.0
File: global\qglobal.cpp
Line: 2232
ASSERT: "!this->isEmpty()" in file c:\iwmake\build_vs2010_opensource________________padding________________\include\qtcore\../../src/corelib/tools/qstack.h, line 68

This happened to me in some different situations.

Comment by Fabian Beutel [ 21 Feb '12 ]

I'm sorry, I think I just misunderstood the concept behind the item move.

If anyone is interested: The same "bug" was reported before and is not a bug: https://bugreports.qt-project.org/browse/QTBUG-6940

Comment by Fabian Beutel [ 21 Feb '12 ]

See https://bugreports.qt-project.org/browse/QTBUG-6940

Generated at Fri Dec 14 09:41:14 UTC 2018 using Jira 7.11.2#711002-sha1:fdc329dee91471a641faabfe39b5ff8c0a5b3f66.