https://issues.qgis.org/https://issues.qgis.org/favicon.ico2015-09-21T11:16:07ZQGIS Issue TrackingQGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637622015-09-21T11:16:07ZSalvatore Larosalrssvtml@gmail.com
<ul></ul><p>I can confirm the crash (Debian wheezy) and I am getting a similar crash when deleting a virtual field.<br />I am attaching the stacktrace here as it seems affecting the same portion of code.</p>
<p>The steps for me are:</p>
<ul>
<li>open the attribute table</li>
<li>create a virtual field with expression = "other field" </li>
<li>open delete column dialog (from the toolbar of attribute table)</li>
<li>the only selectable column is the new virtual field, select it</li>
<li>ok on dialog</li>
<li>crash</li>
</ul>
<pre>
Program received signal SIGABRT, Aborted.
0x00007fffefb1e165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007fffefb1e165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fffefb213e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00000000004daa58 in myMessageOutput (type=QtFatalMsg, msg=
0x6040f58 "ASSERT failure in QVector<T>::remove: \\"index out of range\\", file /usr/include/qt4/QtCore/qvector.h, line 375")
at /home/sam/pacchetti_gis/QGIS/src/app/main.cpp:378
#3 0x00007ffff2a9e630 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4 0x00007ffff2a9ea98 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5 0x00007ffff2a9ec24 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6 0x00007ffff3ead1dc in QVector<QVariant>::remove (this=0x7fffffffb7f0, i=2) at /usr/include/qt4/QtCore/qvector.h:375
#7 0x00007ffff3ea8abc in QgsAttributeForm::onAttributeDeleted (this=0x5cd9ad0, idx=2)
at /home/sam/pacchetti_gis/QGIS/src/gui/qgsattributeform.cpp:295
#8 0x00007ffff3ff48d1 in QgsAttributeForm::qt_static_metacall (_o=0x5cd9ad0, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7fffffffb9d0)
at /home/sam/pacchetti_gis/QGIS/build-master/src/gui/moc_qgsattributeform.cxx:87
#9 0x00007ffff2bb954f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007ffff4b3f240 in QgsVectorLayer::attributeDeleted (this=0x5a51640, _t1=2)
at /home/sam/pacchetti_gis/QGIS/build-master/src/core/moc_qgsvectorlayer.cxx:343
#11 0x00007ffff494b0d1 in QgsVectorLayer::removeExpressionField (this=0x5a51640, index=2)
at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayer.cpp:2941
#12 0x00007ffff4947e99 in QgsVectorLayer::deleteAttribute (this=0x5a51640, index=2) at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayer.cpp:2232
#13 0x00007ffff4948014 in QgsVectorLayer::deleteAttributes (this=0x5a51640, attrs=...)
at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayer.cpp:2253
#14 0x0000000000591e99 in QgsAttributeTableDialog::on_mRemoveAttribute_clicked (this=0x5a265e0)
at /home/sam/pacchetti_gis/QGIS/src/app/qgsattributetabledialog.cpp:725
#15 0x00000000008eb36c in QgsAttributeTableDialog::qt_static_metacall (_o=0x5a265e0, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fffffffbec0)
at /home/sam/pacchetti_gis/QGIS/build-master/src/app/moc_qgsattributetabledialog.cxx:133
#16 0x00000000008eb84a in QgsAttributeTableDialog::qt_metacall (this=0x5a265e0, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fffffffbec0)
at /home/sam/pacchetti_gis/QGIS/build-master/src/app/moc_qgsattributetabledialog.cxx:195
#17 0x00007ffff2bb9713 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#18 0x00007ffff25b2f32 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
</pre> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637662015-09-21T14:35:36ZGiuseppe Sucamelibrush.tyler@gmail.com
<ul><li><strong>Assignee</strong> set to <i>Giuseppe Sucameli</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>In Progress</i></li><li><strong>Category</strong> changed from <i>Field calculator</i> to <i>Vectors</i></li><li><strong>Subject</strong> changed from <i>Crash when adding new field and deleting the same field without save</i> to <i>Crash when adding new field, changing its value and deleting the same field without save</i></li></ul><p>Even reproducible using "New column", just changing any attribute value of the new column before deleting it.</p> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637672015-09-21T14:49:29ZGiuseppe Sucamelibrush.tyler@gmail.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li></ul><p>Fixed in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/ce6264065de0ee4a01f305b411251d65ae54f97f" title="fix crash deleting a new column which contains changed values (fix #13366), when a column is del...">ce6264065de0ee4a01f305b411251d65ae54f97f</a>.</p> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637722015-09-21T22:47:05ZSalvatore Larosalrssvtml@gmail.com
<ul></ul><p>Hi Giuseppe, so you cannot reproduce the crash with a virtual field following the steps reported in my comment?</p>
<p>Thank you, the first crash (that reported by Pedro) is fixed.</p> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637732015-09-21T22:59:01ZGiuseppe Sucamelibrush.tyler@gmail.com
<ul></ul><p>I overlooked your comment, you are creating a virtual field...<br />I didn't checked it. Does it still crash with virtual field?</p> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637782015-09-22T00:40:51ZSalvatore Larosalrssvtml@gmail.com
<ul></ul><p>Yes, still crash here with <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/ce6264065de0ee4a01f305b411251d65ae54f97f" title="fix crash deleting a new column which contains changed values (fix #13366), when a column is del...">ce62640</a>.</p> QGIS Application - Bug report #13366: Crash when adding new field, changing its value and deleting the same field without savehttps://issues.qgis.org/issues/13366?journal_id=637822015-09-22T04:29:30ZTom Chadwintom.chadwin@nnpa.org.uk
<ul></ul><p>No crash for me on 2.10.1 Win7 x64. Have followed steps here both for normal and virtual field creation, and I've never recreated a crash.</p>