Bug report #8296

QGIS crashes when edit a vector layer if attributes table is open

Added by Salvatore Larosa over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Digitising
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:Yes Copied to github as #:17092

Description

I am facing this issue sometimes while I edit a vector layer
after saving I get the crash, but only if attributes table is open.

Program received signal SIGABRT, Aborted.
0x00007ffff0470475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff0470475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff04736f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00000000005621ba in myMessageOutput (type=QtFatalMsg, msg=
    0x548ca38 "ASSERT: \\"mRowIdMap.size() == mIdRowMap.size()\\" in file /home/sam/pacchetti_gis/Quantum-GIS/src/gui/attributetable/qgsattributetablemodel.cpp, line 123") at /home/sam/pacchetti_gis/Quantum-GIS/src/app/main.cpp:285
#3  0x00007ffff33ee630 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffff33eea98 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffff33eec24 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffff41ce6ef in QgsAttributeTableModel::removeRows (this=0x523a100, row=132, count=1, parent=...)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/gui/attributetable/qgsattributetablemodel.cpp:123
#7  0x0000000000607c16 in QAbstractItemModel::removeRow (this=0x523a100, arow=132, aparent=...)
    at /usr/include/qt4/QtCore/qabstractitemmodel.h:319
#8  0x00007ffff41cdc8b in QgsAttributeTableModel::featureDeleted (this=0x523a100, fid=132)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/gui/attributetable/qgsattributetablemodel.cpp:84
#9  0x00007ffff42c443e in QgsAttributeTableModel::qt_static_metacall (_o=0x523a100, _c=QMetaObject::InvokeMetaMethod, 
    _id=5, _a=0x7fffffffb960)
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/gui/attributetable/moc_qgsattributetablemodel.cxx:70
#10 0x00007ffff350954f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007ffff4ba1763 in QgsVectorLayer::featureDeleted (this=0x52114a0, _t1=132)
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/core/moc_qgsvectorlayer.cxx:323
#12 0x00007ffff4ba0fe6 in QgsVectorLayer::qt_static_metacall (_o=0x52114a0, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=
    0x7fffffffbb40) at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/core/moc_qgsvectorlayer.cxx:186
#13 0x00007ffff350954f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#14 0x00007ffff4ba203b in QgsVectorLayerEditBuffer::featureDeleted (this=0x5207790, _t1=132)
    at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/core/moc_qgsvectorlayereditbuffer.cxx:157
#15 0x00007ffff4a9998e in QgsVectorLayerUndoCommandDeleteFeature::redo (this=0x54b16c0)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsvectorlayerundocommand.cpp:109
#16 0x00007ffff2eeae03 in QUndoStack::push(QUndoCommand*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007ffff4a89bb8 in QgsVectorLayerEditBuffer::deleteFeature (this=0x5207790, fid=132)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsvectorlayereditbuffer.cpp:144
#18 0x00007ffff4a79aa1 in QgsVectorLayer::deleteFeature (this=0x52114a0, fid=132)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsvectorlayer.cpp:2520
#19 0x00007ffff4a6ef78 in QgsVectorLayer::deleteSelectedFeatures (this=0x52114a0)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsvectorlayer.cpp:1330
#20 0x000000000058d052 in QgisApp::deleteSelected (this=0x1056ac0, layer=0x52114a0, parent=0x1056ac0)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/app/qgisapp.cpp:4663
#21 0x00000000008cc8d5 in QgisApp::qt_static_metacall (_o=0x1056ac0, _c=QMetaObject::InvokeMetaMethod, _id=54, _a=
    0x7fffffffc1f0) at /home/sam/pacchetti_gis/Quantum-GIS/build-master/src/app/moc_qgisapp.cxx:571
#22 0x00007ffff350954f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007ffff2897502 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff28976f0 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff2c5785f in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007ffff2c57b0c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffff2d11a8a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007ffff28ece10 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff289d70c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff28a23eb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff48f31e8 in QgsApplication::notify (this=0x7fffffffd890, receiver=0x1095b40, event=0x7fffffffcb50)
    at /home/sam/pacchetti_gis/Quantum-GIS/src/core/qgsapplication.cpp:242
#32 0x00007ffff34f3b5e in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#33 0x00007ffff289e54b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007ffff2918fc4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff2917d51 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff293ebc2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007fffeed7d355 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fffeed7d688 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fffeed7d744 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007ffff3522276 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#41 0x00007ffff293e83e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#42 0x00007ffff34f28af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#43 0x00007ffff34f2b38 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#44 0x00007ffff34f7cf8 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#45 0x0000000000564e19 in main (argc=1, argv=0x7fffffffe388) at /home/sam/pacchetti_gis/Quantum-GIS/src/app/main.cpp:1020

issue_8296.zip (2.64 KB) Salvatore Larosa, 2013-07-15 02:58 AM

History

#1 Updated by Giovanni Manghi over 11 years ago

Salvatore, good morning,
if this is confirmed then should be a blocker. I can't remember such issue in previous qgis releases.

#2 Updated by Salvatore Larosa over 11 years ago

  • Priority changed from High to Severe/Regression
  • File issue_8296.zip added

With the attached sample data I get the crash:

  • Load SHP and open attribute tables (using the dock window the crash is more frequent)
  • Toggle editing
  • Move selection to top (CTRL+T)
  • Add one feature
  • Remove a different feature
  • Add another feature
  • Toggle editing
  • Save
  • Crash

#3 Updated by Jürgen Fischer over 11 years ago

  • Status changed from Open to Feedback

Salvatore Larosa wrote:

With the attached sample data I get the crash:

  • Load SHP and open attribute tables (using the dock window the crash is more frequent)
  • Toggle editing
  • Move selection to top (CTRL+T)
  • Add one feature
  • Remove a different feature
  • Add another feature
  • Toggle editing
  • Save
  • Crash

This might have been fixed with 78b04df9 too.

#4 Updated by Salvatore Larosa over 11 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Yes, it was fixed, thanks!

Also available in: Atom PDF