OnroerendErfgoed / brdrQ

Autocorrectborders, a QGIS-processing script for aligning thematic borders to reference borders.
MIT License
2 stars 0 forks source link

QGIS/BrdrQ crashes when writing results tot to TOC (qgis 3.34) #19

Closed dieuska closed 1 month ago

dieuska commented 2 months ago

Possibly due to the Symbol -code for the layer in the TOC

Crash report:

Report Details

Python Stack Trace

Windows fatal exception: access violation

Current thread 0x0000652c (most recent call first):
  File "C:\Users\saravdv\AppData\Roaming\QGIS\QGIS3\profiles\default\processing\scripts\autocorrectborders.py", line 401 in geojson_to_layer
    vl.setRenderer(renderer)
  File "C:\Users\saravdv\AppData\Roaming\QGIS\QGIS3\profiles\default\processing\scripts\autocorrectborders.py", line 679 in processAlgorithm
    self.geojson_to_layer(self.LAYER_RESULT, fcs["result"], self.get_renderer(QgsFillSymbol(
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmExecutor.py", line 62 in execute
    results, ok = alg.run(parameters, context, feedback)
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 334 in runAlgorithm
    ok, results = execute(self.algorithm(), parameters, self.context, self.feedback)
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\ProcessingPlugin.py", line 432 in executeAlgorithm
    dlg.exec_()
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 232 in executeAlgorithm
    self.executeWithGui.emit(alg.id(), self, self.in_place_mode, False)
Windows fatal exception: access violation

Current thread 0x0000652c (most recent call first):
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmExecutor.py", line 62 in execute
    results, ok = alg.run(parameters, context, feedback)
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 334 in runAlgorithm
    ok, results = execute(self.algorithm(), parameters, self.context, self.feedback)
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\ProcessingPlugin.py", line 432 in executeAlgorithm
    dlg.exec_()
  File "C:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 232 in executeAlgorithm
    self.executeWithGui.emit(alg.id(), self, self.in_place_mode, False)

Stack Trace


QgsSymbol::~QgsSymbol :
pdal::Option::getName :
QgsSingleSymbolRenderer::~QgsSingleSymbolRenderer :
pdal::Option::getName :
QgsVectorLayer::~QgsVectorLayer :
pdal::MetadataNode::value :
pdal::MetadataNode::value :
PyDict_NewPresized :
Py_CheckFunctionResult :
PyTrash_thread_destroy_chain :
PyTrash_thread_destroy_chain :
pdal::StreamPointTable::finalize :
pdal::StreamPointTable::finalize :
pdal::Option::getName :
QgsProcessingAlgorithm::runPrepared :
QgsProcessingAlgorithm::run :
pdal::Option::getName :
PyArg_ParseTuple_SizeT :
PyEval_EvalFrameDefault :
PyObject_GC_Del :
PyEval_EvalFrameDefault :
PyObject_GC_Del :
PyFunction_Vectorcall :
PyFloat_FromDouble :
PyVectorcall_Call :
PyObject_Call :
PyInit__gui :
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 :
PyInit_QtWidgets :
PyArg_ParseTuple_SizeT :
PyEval_EvalFrameDefault :
PyObject_GC_Del :
PyFunction_Vectorcall :
PyFloat_FromDouble :
PyVectorcall_Call :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QObject::qt_static_metacall :
QMetaObject::activate :
PyInit_QtCore :
PyInit_QtCore :
PyType_GenericNew :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyFloat_FromDouble :
PyVectorcall_Call :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QObject::qt_static_metacall :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
PyInit__gui :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
PyInit__gui :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
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.0-Prizren QGIS code revision: ffbdd67881 Compiled against Qt: 5.15.3 Running against Qt: 5.15.3 Compiled against GDAL: 3.7.2 Running against GDAL: 3.7.2

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

dieuska commented 2 months ago

possible fix, to take a .clone() of the renderer en symbol

This has to be tested by the user

dieuska commented 1 month ago

Possible a 'won't fix' as this isn't a problem form version 3.34.4 and beyond. In 3.28 and former versions of 3.34.0 this is a problem, but we suggest to upgrade to the LTR version of 3.34. This uses a higher python versions, is more stable and faster. (When brdrQ becomes more mature, in that period all users has to be on QGIS version >3.34.8.

So this is fixed by adding an extra requirement on the QGIS-version