We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
The QgsPoint() constructor crashes QGIS if given wrong arguments instead of raising a TypeError.
QgsPoint()
This happens for instance if trying to use the inexistant QgsPoint(QgsPoint p) (instead of QgsPoint(QgsPointXY p)).
QgsPoint(QgsPoint p)
QgsPoint(QgsPointXY p)
It seems to also happen with other invalid arguments (I tried with a string).
The error was reproduced by multiple users (see QGEP/QGEP#546).
How to Reproduce
In the QGIS python console, type one of
point_a = QgsPoint(10,20) point_b = QgsPoint(point_a)
or
point_a = QgsPoint('of course you dont like strings')
And it freezes and crashes.
QGIS and OS versions
QGIS 3.10.2 QGIS code revision d4cd3cf Compiled against Qt 5.11.2 Running against Qt 5.11.2
Additional context
Crash dump :
Crash ID: 4f80db0c784b9e0b969887a03450fdc6d8e4342b Stack Trace init_type_QgsPoint sip_corepart1.cpp:47370 PyObject_FastCallKeywords : PyObject_FastCallKeywords : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyEval_EvalCodeWithName : PyImport_Import : PyImport_Import : PyMethodDef_RawFastCallKeywords : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyEval_EvalCodeWithName : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyEval_EvalCodeWithName : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyMethodDef_RawFastCallKeywords : PyEval_EvalFrameDefault : PyFunction_FastCallDict : PyMethodDef_RawFastCallDict : PyObject_Call : PyInit_sip : PyInit_Qsci : QWidget::event : QFrame::event : QAbstractScrollArea::event : PyInit_Qsci : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify qgsapplication.cpp:418 QCoreApplication::notifyInternal2 : QSizePolicy::QSizePolicy : QSizePolicy::QSizePolicy : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify qgsapplication.cpp:418 QCoreApplication::notifyInternal2 : QGuiApplicationPrivate::processKeyEvent : QWindowSystemInterface::sendWindowSystemEvents : QEventDispatcherWin32::processEvents : UserCallWinProcCheckWow : DispatchMessageWorker : QEventDispatcherWin32::processEvents : qt_plugin_query_metadata : QEventLoop::exec : QCoreApplication::exec : main main.cpp:1598 BaseThreadInitThunk : RtlUserThreadStart : QGIS Info QGIS Version: 3.10.2-A Coru�a QGIS code revision: d4cd3cfe5a Compiled against Qt: 5.11.2 Running against Qt: 5.11.2 Compiled against GDAL: 3.0.3 Running against GDAL: 3.0.4 System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.17763
The text was updated successfully, but these errors were encountered:
Fix QgsPoint ctor with invalid arguments
8cbb23c
Fixes qgis#34557
738e245
Fixes qgis#34557 (cherry picked from commit 8cbb23c)
37135ec
Fixes #34557 (cherry picked from commit 8cbb23c)
elpaso
Successfully merging a pull request may close this issue.
Describe the bug
The
QgsPoint()
constructor crashes QGIS if given wrong arguments instead of raising a TypeError.This happens for instance if trying to use the inexistant
QgsPoint(QgsPoint p)
(instead ofQgsPoint(QgsPointXY p)
).It seems to also happen with other invalid arguments (I tried with a string).
The error was reproduced by multiple users (see QGEP/QGEP#546).
How to Reproduce
In the QGIS python console, type one of
or
And it freezes and crashes.
QGIS and OS versions
QGIS 3.10.2
QGIS code revision d4cd3cf
Compiled against Qt 5.11.2
Running against Qt 5.11.2
Additional context
Crash dump :
The text was updated successfully, but these errors were encountered: