-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.4.1
-
None
-
Archlinux, also could reproduce on Debian Jessie with Qt 5.3.2.
When using QStandardItem with the QStandardItem::QStandardItem(int rows, int columns = 1) constructor, and passing 268435453 or bigger as int, I get this in Qt Designer:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
gdb backtrace (from a different system):
#0 0x00007ffff7406c2d in __memset_sse2 () from /usr/lib/libc.so.6 #1 0x00007fffeccc522d in defaultConstruct (this=0x555558391490, to=<optimized out>, from=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qvector.h:284 #2 QVector<QStandardItem*>::reallocData (this=0x555558391490, asize=1426111944, aalloc=<optimized out>, options=...) at ../../include/QtCore/../../src/corelib/tools/qvector.h:529 #3 0x00007fffeccc52a5 in QVector<QStandardItem*>::resize (this=this@entry=0x555558391490, asize=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qvector.h:381 #4 0x00007fffeccbdc18 in QStandardItemPrivate::insertColumns (this=this@entry=0x555558391470, column=column@entry=0, count=count@entry=1, items=...) at itemmodels/qstandarditemmodel.cpp:450 #5 0x00007fffeccbde81 in QStandardItem::insertColumns (this=0x5555583913e0, column=0, count=1) at itemmodels/qstandarditemmodel.cpp:1521