Skip to content

Field calculator allowed string * float operation and program crashed #66507

Description

@aentropic

What is the bug or the crash?

User Feedback

On accident, tried creating a Integer (32bit) new column via Field Calculator that multiplied a String field (this was supposed to be an Integer but I didn't import the CSV table properly) by a Float field. There were 141 lines in total. I believe the pre-visualization for the Field Calculator should have detected the expression as invalid and blocked the 'ok' button from being pressed as I imagine the string*float operation is what caused the crash

Report Details

Python Stack Trace

Windows fatal exception: access violation

Current thread 0x00003cf0 (most recent call first):
  <no Python frame>

Stack Trace


QgsAttributesFormProperties::QgsAttributesFormProperties :
QgsAttributeTableModel::prefetchSortData :
QgsAttributeTableFilterModel::setAttributeTableConfig :
QgsDualView::hideEvent :
QObject::qt_static_metacall :
QgsVectorLayer::updateFields :
QgsVectorLayerUndoCommandAddAttribute::redo :
QUndoStack::push :
QgsVectorLayerEditBuffer::addAttribute :
QgsFieldCalculator::accept :
QObject::qt_static_metacall :
QDialogButtonBox::qt_static_metacall :
QObject::qt_static_metacall :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgsAttributeTableDialog::mActionOpenFieldCalculator_triggered :
QObject::qt_static_metacall :
QAction::activate :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.34.10-Prizren
QGIS code revision: 113de9e
Compiled against Qt: 5.15.13
Running against Qt: 5.15.13
Compiled against GDAL: 3.9.2
Running against GDAL: 3.9.2

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.19045

Steps to reproduce the issue

Try creating an Integer (32bit) new column via Field Calculator that multiplied a String field (this was supposed to be an Integer but I didn't import the CSV table properly) by a Float field

Versions

QGIS Info
QGIS Version: 3.34.10-Prizren
QGIS code revision: 113de9e
Compiled against Qt: 5.15.13
Running against Qt: 5.15.13
Compiled against GDAL: 3.9.2
Running against GDAL: 3.9.2

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Attribute TableBugEither a bug report, or a bug fix. Let's hope for the latter!Crash/Data CorruptionFeedbackWaiting on the submitter for answersstaleUh oh! Seems this work is abandoned, and the PR is about to close.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions