Qt-interest Archive, April 2007
QSqlTableModel and revertAll() crash
Message 1 in thread
hi all
I've found a very strange behaviour of QSqlTableModel in the Qt4.3beta
(opensuse Qt4.2.90 rpm). Let's have a scenario:
- table model is in the OnManualSubmit mode.
- user clicks a button and the insertRow() is called
- primeInsert() signalis emitted. In its slot I prefill default values.
- user edits one of default values but stays in the editor (delegate?)
- user clicks "rollback" button and the revertAll() is called.
- nice SIGSERV approaches. See P.S. notes.
Any hints?
best regards
Petr Vanek
P.S.:
source:
"rollback" call:
http://tools.assembla.com/sqliteman/browser/Sqliteman/sqliteman/dataviewer.cpp#L160
backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1221716272 (LWP 26048)]
0xb7389f8d in memmove () from /lib/libc.so.6
(gdb) bt
#0 Â0xb7389f8d in memmove () from /lib/libc.so.6
#1 Â0xb75e57a1 in QListData::remove () from /usr/lib/libQtCore.so.4
#2 Â0xb75e57ea in QListData::erase () from /usr/lib/libQtCore.so.4
#3 Â0xb7e22b86 in QAbstractItemView::rowsAboutToBeRemoved ()
from /usr/lib/libQtGui.so.4
#4 Â0xb7e2268d in QAbstractItemView::qt_metacall ()
from /usr/lib/libQtGui.so.4
#5 Â0xb7e4b7ea in QTableView::qt_metacall () from /usr/lib/libQtGui.so.4
#6 Â0xb767f4ff in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#7 Â0xb767fdba in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#8 Â0xb769993f in QAbstractItemModel::rowsAboutToBeRemoved ()
from /usr/lib/libQtCore.so.4
#9 Â0xb7668fb3 in QAbstractItemModel::beginRemoveRows ()
from /usr/lib/libQtCore.so.4
#10 0xb7708776 in QSqlTableModel::QSqlTableModel ()
from /usr/lib/libQtSql.so.4
#11 0xb770543c in QSqlTableModel::revertRow () from /usr/lib/libQtSql.so.4
#12 0xb7705617 in QSqlTableModel::revertAll () from /usr/lib/libQtSql.so.4
#13 0x0808431c in DataViewer::rollback (this=0x8126558)
at /home/pvanek/sqliteman-svn/sqliteman/Sqliteman/sqliteman/dataviewer.cpp:163
--
[ signature omitted ]