Bug report #11940

QGIS master field calculator does not compute the results for the first record (and causes crash on Linux)

Added by Giovanni Manghi over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Martin Dobias
Category:Field calculator
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:20148

Description

Does not happen on 2.6.1

Steps to replicate:

  • open a vector (tested shape)
  • open table of attributes, in my case is docked
  • open field calculator and create a new field (tested double) and use a function like $length or $area
  • the first record of the table will remain "NULL"
  • on linux discard the edits and it will cause a crash (does not on Windows)
[email protected]:~ > qgis
Warning: loading of qgis translation failed [/usr/share/qgis/i18n//qgis_en_US]
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon 
Warning: QGraphicsScene::addItem: item has already been added to this scene
Debugger not enabled
DEBUG:PyQt4.uic.uiparser:UI version is 4.0
DEBUG:PyQt4.uic.uiparser:uiname is Form
DEBUG:PyQt4.uic.uiparser:toplevel widget is RasterBenderDialog
DEBUG:PyQt4.uic.properties:setting property geometry
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property windowTitle
DEBUG:PyQt4.uic.uiparser:push RasterBenderDialog Form
DEBUG:PyQt4.uic.uiparser:push QVBoxLayout verticalLayout_2
DEBUG:PyQt4.uic.properties:setting property title
DEBUG:PyQt4.uic.uiparser:push QGroupBox groupBox_4
DEBUG:PyQt4.uic.properties:setting property fieldGrowthPolicy
DEBUG:PyQt4.uic.uiparser:push QFormLayout formLayout_4
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property alignment
DEBUG:PyQt4.uic.uiparser:push QLabel label_2
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_2
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout_3
DEBUG:PyQt4.uic.properties:setting property placeholderText
DEBUG:PyQt4.uic.uiparser:push QLineEdit sourceRasterPathLineEdit
DEBUG:PyQt4.uic.uiparser:pop widget QLineEdit sourceRasterPathLineEdit
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.properties:setting property toolTip
DEBUG:PyQt4.uic.uiparser:push QComboBox sourceRasterComboBox
DEBUG:PyQt4.uic.uiparser:pop widget QComboBox sourceRasterComboBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout_3
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QLabel label_10
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_10
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout_8
DEBUG:PyQt4.uic.properties:setting property placeholderText
DEBUG:PyQt4.uic.uiparser:push QLineEdit targetRasterPathLineEdit
DEBUG:PyQt4.uic.uiparser:pop widget QLineEdit targetRasterPathLineEdit
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.properties:setting property toolTip
DEBUG:PyQt4.uic.uiparser:push QComboBox targetRasterComboBox
DEBUG:PyQt4.uic.uiparser:pop widget QComboBox targetRasterComboBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104dde90>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout_8
DEBUG:PyQt4.uic.uiparser:pop layout QFormLayout formLayout_4
DEBUG:PyQt4.uic.uiparser:pop widget QGroupBox groupBox_4
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.properties:setting property title
DEBUG:PyQt4.uic.uiparser:push QGroupBox groupBox_2
DEBUG:PyQt4.uic.properties:setting property fieldGrowthPolicy
DEBUG:PyQt4.uic.uiparser:push QFormLayout formLayout_2
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property alignment
DEBUG:PyQt4.uic.uiparser:push QLabel label
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout_2
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.uiparser:push QToolButton createPairsLayerButton
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton createPairsLayerButton
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.uiparser:push QComboBox pairsLayerComboBox
DEBUG:PyQt4.uic.uiparser:pop widget QComboBox pairsLayerComboBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property toolTip
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.uiparser:push QToolButton styleLayerPair
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton styleLayerPair
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.properties:setting property checkable
DEBUG:PyQt4.uic.uiparser:push QToolButton pairsLayerEditModeButton
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton pairsLayerEditModeButton
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QCheckBox pairsLayerRestrictToSelectionCheckBox
DEBUG:PyQt4.uic.uiparser:pop widget QCheckBox pairsLayerRestrictToSelectionCheckBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout_2
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QLabel label_5
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_5
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.uiparser:push QToolButton createConstraintsLayerButton
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton createConstraintsLayerButton
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.uiparser:push QComboBox constraintsLayerComboBox
DEBUG:PyQt4.uic.uiparser:pop widget QComboBox constraintsLayerComboBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property toolTip
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.uiparser:push QToolButton styleLayerConstraint
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton styleLayerConstraint
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property icon
DEBUG:PyQt4.uic.properties:setting property checkable
DEBUG:PyQt4.uic.uiparser:push QToolButton constraintsLayerEditModeButton
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton constraintsLayerEditModeButton
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QCheckBox constraintsLayerRestrictToSelectionCheckBox
DEBUG:PyQt4.uic.uiparser:pop widget QCheckBox constraintsLayerRestrictToSelectionCheckBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout
DEBUG:PyQt4.uic.properties:setting property enabled
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property alignment
DEBUG:PyQt4.uic.uiparser:push QLabel label_3
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_3
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.properties:setting property enabled
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property maximum
DEBUG:PyQt4.uic.properties:setting property value
DEBUG:PyQt4.uic.uiparser:push QDoubleSpinBox bufferSpinBox
DEBUG:PyQt4.uic.uiparser:pop widget QDoubleSpinBox bufferSpinBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f841047c510>
DEBUG:PyQt4.uic.uiparser:pop layout QFormLayout formLayout_2
DEBUG:PyQt4.uic.uiparser:pop widget QGroupBox groupBox_2
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.properties:setting property title
DEBUG:PyQt4.uic.uiparser:push QGroupBox groupBox_5
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout_5
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QLabel label_6
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_6
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104812b0>
DEBUG:PyQt4.uic.properties:setting property value
DEBUG:PyQt4.uic.properties:setting property orientation
DEBUG:PyQt4.uic.uiparser:push QSlider previewSlider
DEBUG:PyQt4.uic.uiparser:pop widget QSlider previewSlider
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104812b0>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QLabel label_7
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_7
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104812b0>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout_5
DEBUG:PyQt4.uic.uiparser:pop widget QGroupBox groupBox_5
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.properties:setting property title
DEBUG:PyQt4.uic.uiparser:push QGroupBox groupBox_3
DEBUG:PyQt4.uic.uiparser:push QFormLayout formLayout_3
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QLabel label_4
DEBUG:PyQt4.uic.uiparser:pop widget QLabel label_4
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104815a8>
DEBUG:PyQt4.uic.properties:setting property sizePolicy
DEBUG:PyQt4.uic.properties:setting property minimum
DEBUG:PyQt4.uic.properties:setting property maximum
DEBUG:PyQt4.uic.properties:setting property singleStep
DEBUG:PyQt4.uic.properties:setting property value
DEBUG:PyQt4.uic.uiparser:push QSpinBox blockSizeSpinBox
DEBUG:PyQt4.uic.uiparser:pop widget QSpinBox blockSizeSpinBox
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f84104815a8>
DEBUG:PyQt4.uic.uiparser:pop layout QFormLayout formLayout_3
DEBUG:PyQt4.uic.uiparser:pop widget QGroupBox groupBox_3
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.properties:setting property title
DEBUG:PyQt4.uic.uiparser:push QGroupBox groupBox
DEBUG:PyQt4.uic.uiparser:push QVBoxLayout verticalLayout
DEBUG:PyQt4.uic.uiparser:push QHBoxLayout horizontalLayout_11
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property wordWrap
DEBUG:PyQt4.uic.uiparser:push QLabel statusLabel
DEBUG:PyQt4.uic.uiparser:pop widget QLabel statusLabel
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f8410481808>
DEBUG:PyQt4.uic.properties:setting property enabled
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.uiparser:push QToolButton abortButton
DEBUG:PyQt4.uic.uiparser:pop widget QToolButton abortButton
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f8410481808>
DEBUG:PyQt4.uic.uiparser:pop layout QHBoxLayout horizontalLayout_11
DEBUG:PyQt4.uic.properties:setting property enabled
DEBUG:PyQt4.uic.properties:setting property value
DEBUG:PyQt4.uic.properties:setting property format
DEBUG:PyQt4.uic.uiparser:push QProgressBar pixelProgressBar
DEBUG:PyQt4.uic.uiparser:pop widget QProgressBar pixelProgressBar
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f8410481808>
DEBUG:PyQt4.uic.properties:setting property enabled
DEBUG:PyQt4.uic.properties:setting property value
DEBUG:PyQt4.uic.properties:setting property format
DEBUG:PyQt4.uic.uiparser:push QProgressBar blockProgressBar
DEBUG:PyQt4.uic.uiparser:pop widget QProgressBar blockProgressBar
DEBUG:PyQt4.uic.uiparser:new topwidget <PyQt4.QtGui.QGroupBox object at 0x7f8410481808>
DEBUG:PyQt4.uic.uiparser:pop layout QVBoxLayout verticalLayout
DEBUG:PyQt4.uic.uiparser:pop widget QGroupBox groupBox
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.properties:setting property text
DEBUG:PyQt4.uic.properties:setting property default
DEBUG:PyQt4.uic.uiparser:push QPushButton runButton
DEBUG:PyQt4.uic.uiparser:pop widget QPushButton runButton
DEBUG:PyQt4.uic.uiparser:new topwidget <RasterBender.rasterbenderdialog.RasterBenderDialog object at 0x7f84104ddcc8>
DEBUG:PyQt4.uic.uiparser:pop layout QVBoxLayout verticalLayout_2
DEBUG:PyQt4.uic.uiparser:pop widget RasterBenderDialog Form
DEBUG:PyQt4.uic.uiparser:new topwidget None
Warning: Object::connect: No such slot QgisApp::resetMapSettings() in /tmp/buildd/qgis-2.7.0+git20150102+2b7e49b~trusty/src/app/qgisapp.cpp:2129
Warning: Object::connect:  (sender name:   'MainWindow')
Warning: Object::connect:  (receiver name: 'MainWindow')
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
Fatal: ASSERT: "mChangedAttributeValues.isEmpty()" in file /tmp/buildd/qgis-2.7.0+git20150102+2b7e49b~trusty/src/core/qgsvectorlayereditbuffer.cpp, line 531
QGIS died on signal -1[New LWP 17933]
[New LWP 17932]
[New LWP 17930]
[New LWP 17897]
[New LWP 17896]
[New LWP 17895]
[New LWP 17894]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f849212d619 in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7f849a2e0800 (LWP 17893))]
#0  0x00007f849212d619 in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x0000000000509f37 in qgisCrash(int) ()
No symbol table info available.
#2  0x000000000050a040 in myMessageOutput(QtMsgType, char const*) ()
No symbol table info available.
#3  0x00007f8495131bb1 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#4  0x00007f8495131ff9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#5  0x00007f8495132804 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#6  0x00007f84965adef0 in QgsVectorLayerEditBuffer::rollBack() () from /usr/lib/libqgis_core.so.2.7.0
No symbol table info available.
#7  0x00007f84965a5768 in QgsVectorLayer::rollBack(bool) () from /usr/lib/libqgis_core.so.2.7.0
No symbol table info available.
#8  0x0000000000542823 in QgisApp::toggleEditing(QgsMapLayer*, bool) ()
No symbol table info available.
#9  0x000000000084f19f in ?? ()
No symbol table info available.
#10 0x00007f849525287a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#11 0x00007f84945d1a62 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#12 0x00007f84945d3433 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#13 0x00007f849498ab02 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#14 0x00007f849498ac2c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#15 0x00007f8494a41a4a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#16 0x00007f849462750a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#17 0x00007f84945d7e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#18 0x00007f84945de5dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#19 0x00007f84963e494b in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.7.0
No symbol table info available.
#20 0x00007f849523e4dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#21 0x00007f84945ddd93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#22 0x00007f84946529cb in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#23 0x00007f8494652269 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#24 0x00007f8494679b02 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#25 0x00007f848fefbe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#26 0x00007f848fefc048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#27 0x00007f848fefc0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#28 0x00007f849526b7a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#29 0x00007f8494679bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#30 0x00007f849523d0af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#31 0x00007f849523d3a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#32 0x00007f8495242b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#33 0x00000000005049e0 in main ()
No symbol table info available.
gdb returned 0
Aborted

Associated revisions

Revision bbc7cba5
Added by Martin Dobias over 4 years ago

Fix a crash resulting from corrupted undo stack (fixes #11940)

In field calc opened from attribute table, when changing attributes
there is a series of signals: layer emits attributeValueChanged(),
cache forces update of attribute table data, which at one point calls
layer.isModified(), emitting beforeModifiedCheck() - in turn calling
save() of attribute form, which would change first feature's new attribute
to a bogus value. This recursive change of attribute values corrupts
the undo stack.

The fix pre-sets the feature's attribute so that no dummy entry is
added to the undo stack.

In the future we should probably try to improve the whole cascade
to avoid bugs like this one:
1. if possible, make emission of edit signals "safe", so a slot can
do more editing calls without corrupting undo stack
2. get rid of beforeModifiedCheck() signal as it adds quite surprising
behavior (and overhead) to what should be a simple check

History

#1 Updated by Pedro Venâncio over 4 years ago

Confirmed here (OSGeo4W 64bits) with shapefiles and Postgis layers.

Please see the screencast: https://dl.dropboxusercontent.com/u/5772257/qgis/field_calculator.avi

#2 Updated by Giovanni Manghi over 4 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

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

  • Category changed from Vectors to Field calculator

#4 Updated by Martin Dobias over 4 years ago

  • Assignee set to Martin Dobias

#5 Updated by Martin Dobias over 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF