Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
Gentoo. Qt git branch 4.7 899c6dfcbc0d5ffd8da5676b3496ae31d2515235. GCC 4.4.3.
-
4026b2c7bc91f8f25f73b182687d5d2bed823217,e8d3e8e0b93271bb41fcdc264fc10ec59be5aa20
Description
The attached qml script provides a testcase for the mentioned crash. When using a list, property of a ListModel item, as a submodel, the clear() method on such submodel causes a SEGFAULT. Though removing items one by one does work fine.
Testcase:
- Click on window
- Click on created item
- Crash
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff62bfc56 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
(gdb) bt
#0 0x00007ffff62bfc56 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
from /usr/lib64/qt4/libQtCore.so.4
#1 0x00007ffff7b102ef in QListModelInterface::itemsRemoved(int, int) () from /usr/lib64/qt4/libQtDeclarative.so.4
#2 0x00007ffff796ec1c in QDeclarativeListModel::clear() () from /usr/lib64/qt4/libQtDeclarative.so.4
#3 0x00007ffff7b0ef90 in QDeclarativeListModel::qt_metacall(QMetaObject::Call, int, void**) ()
from /usr/lib64/qt4/libQtDeclarative.so.4
Expected results:
The list should be cleared with no problems.