GIS4WRF / gis4wrf

QGIS toolkit šŸ§° for pre- and post-processing šŸ”Ø, visualizing šŸ”, and running simulations šŸ’» in the Weather Research and Forecasting (WRF) model šŸŒ€
https://gis4wrf.github.io
MIT License
159 stars 36 forks source link

Crash when setting domain parameters in QGIS 3.16 (Windows only) #202

Closed thenerdie closed 3 years ago

thenerdie commented 3 years ago

Describe the bug QGIS will randomly crash when setting various domain parameters.

To Reproduce Steps to reproduce the behavior:

  1. Open QGIS
  2. Try to set parameters in the Simulation > Domain tab
  3. It will freeze the window and then crash

Expected behavior I expect setting domain parameters to not cause QGIS to crash randomly.

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot

System Information (please complete the following information): QGIS Info QGIS Version: 3.16.2-Hannover QGIS code revision: f1660f9da5 Compiled against Qt: 5.11.2 Running against Qt: 5.11.2 Compiled against GDAL: 3.1.4 Running against GDAL: 3.1.4

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

Additional context I'm just trying to run a WRF simulation for a certain region as a hobby, nothing else. This crash occurs when trying to set the canvas extent, and also when I try to set the padding in the Parenting tab. I'm running QGIS on a fairly typical, high-end PC.

Stack trace

PyModule_Create2 :
PyInit__ctypes :
PyUnicode_EncodeCharmap :
PyUnicode_EncodeCharmap :
PyUnicode_EncodeCharmap :
PyMethodDef_RawFastCallDict :
PyException_SetTraceback :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallMethodIdObjArgs :
PyObject_CallMethodIdObjArgs :
PyUnicode_FindChar :
PyImport_ImportModuleLevelObject :
PyType_Lookup :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyImport_Import :
PyImport_Import :
PyMethodDef_RawFastCallDict :
PyException_SetTraceback :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallMethodIdObjArgs :
PyObject_CallMethodIdObjArgs :
PyUnicode_FindChar :
PyImport_ImportModuleLevelObject :
PyType_Lookup :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyImport_Import :
PyImport_Import :
PyMethodDef_RawFastCallDict :
PyException_SetTraceback :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallMethodIdObjArgs :
PyObject_CallMethodIdObjArgs :
PyUnicode_FindChar :
PyImport_ImportModuleLevelObject :
PyDict_GetItemString :
PyException_SetTraceback :
PyException_SetTraceback :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyFunction_FastCallDict :
PyObject_CallMethodIdObjArgs :
PyObject_CallMethodIdObjArgs :
PyImport_ImportModuleLevelObject :
PyType_Lookup :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyImport_Import :
PyImport_Import :
PyMethodDef_RawFastCallDict :
PyException_SetTraceback :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallMethodIdObjArgs :
PyObject_CallMethodIdObjArgs :
PyUnicode_FindChar :
PyImport_ImportModuleLevelObject :
PyType_Lookup :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyEval_EvalCodeEx :
PyEval_EvalCode :
PyImport_ImportFrozenModuleObject :
PyImport_ExecCodeModuleObject :
PyImport_ExecCodeModuleWithPathnames :
VRTDerivedRasterBand::InitializePython :
VRTDerivedRasterBand::IRasterIO :
VRTSourcedRasterBand::IReadBlock :
GDALRasterBand::GetLockedBlockRef :
GDALRasterBand::ComputeStatistics :
GDALRasterBand::GetStatistics :
QgsGdalProvider::bandStatistics qgsgdalprovider.cpp:2787
QgsRasterLayer::computeMinMax qgsrasterlayer.cpp:981
QgsRasterLayer::setContrastEnhancement qgsrasterlayer.cpp:1093
QgsRasterLayer::setDefaultContrastEnhancement qgsrasterlayer.cpp:1413
QgsRasterLayer::setDataSource qgsrasterlayer.cpp:954
QgsRasterLayer::QgsRasterLayer qgsrasterlayer.cpp:132
sipQgsRasterLayer::sipQgsRasterLayer sip_corepart3.cpp:14006
init_type_QgsRasterLayer sip_corepart3.cpp:18849
PyObject_FastCallKeywords :
PyObject_FastCallKeywords :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyMethodDef_RawFastCallDict :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QMetaObject::activate :
QAbstractButton::clicked :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:458
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:458
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
UserCallWinProcCheckWow :
DispatchMessageWorker :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main main.cpp:1637
BaseThreadInitThunk :
RtlUserThreadStart :
thenerdie commented 3 years ago

It's very possible I need a much much much more powerful machine to run this l0l

letmaik commented 3 years ago

I can reproduce this, looks like a QGIS bug. In 3.12 (and possibly later version before 3.16) it's all working still.

letmaik commented 3 years ago

I opened an issue in the QGIS repo, but for now I recommend downgrading QGIS, the functionality you get with using gis4wrf will be the same.

thenerdie commented 3 years ago

Alright, thank you!

letmaik commented 3 years ago

This issue was fixed upstream in gdal (3.2.2) and will trickle down to QGIS in some newer version. For now, we recommend using an older QGIS version.

letmaik commented 2 years ago

The issue is fixed in QGIS 3.18 and 3.20, tested with 3.18.3 and 3.20.3. Note that using those newer QGIS versions on Windows is only possible with gis4wrf 0.14.5 or later. EDIT: As of QGIS 3.16.15 (and possibly a few earlier patch versions) the issue is fixed.