[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
Environment:

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


Attachments: Text File main.cpp    

 Description   

Hey,

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.



 Comments   
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 Tue Aug 14 17:31:24 UTC 2018 using JIRA 7.3.4#73015-sha1:a262b3457b3605f12635df4b0a0c3dc71d631a1e.