lizmap-plugin icon indicating copy to clipboard operation
lizmap-plugin copied to clipboard

[Bug]: When layers are missing in QGIS project, Lizmap plugin makes QGIS crash

Open gioman opened this issue 5 months ago • 5 comments

What is the bug?

  1. start a new QGIS profile, to be sure there is nothing else interfering

  2. open a project (with a .cfg file) with missing layers, for example open a project with remote postgis layers but teh server is not accessible, or the computer does not have a connection > QGIS dialogs about how to handle the situation do show, and ultimately is asked if to keep the missing layers or discard them. Choose to keep them and is all good (no crashes)

Now repeat, but after step 1 install the Lizmap plugin. When pressing "keep layers" in the QGIS dialog that asks how to handle the missing layers, QGIS crashes.

Interesting enough, if Lizmap plugin is installed right after step 2 (in the scenario where the plugin is not installed at the beginning), then also QGIS crashes instantly.

Python Stack Trace
Windows fatal exception: access violation

Current thread 0x00009bf8 (most recent call first):
  File "C:\OSGeo4W/apps/qgis-ltr/./python\pyplugin_installer\installer.py", line 351 in showPluginManagerWhenReady
    iface.pluginManagerInterface().showPluginManager(tabIndex)


Stack Trace


providerMetadataFactory :
QgsVectorLayerFeatureSource::QgsVectorLayerFeatureSource :
QgsFeaturePickerModel::qt_static_metacall :
QgsFeaturePickerModel::createValuesGatherer :
QgsFeaturePickerModelBase::scheduledReload :
QObject::qt_static_metacall :
QTimer::timerEvent :
QObject::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QEventDispatcherWin32Private::sendTimerEvent :
QEventDispatcherWin32::processEvents :
UserCallWinProcCheckWow :
DispatchMessageWorker :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
PyInit__gui :
PyThread_acquire_lock_timed :
PyObject_Vectorcall :
PyObject_Vectorcall :
PyEval_EvalFrameDefault :
PyType_CalculateMetaclass :
PyEval_EvalCode :
PyEval_EvalCode :
PyModule_ClearDict :
PyRun_StringFlags :
instance :
instance :
pdal::Stage::run :
QgsPythonRunner::run :
QgisApp::showPluginManager :
QObject::qt_static_metacall :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::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.40.8-Bratislava
QGIS code revision: efaf8952e0
Compiled against Qt: 5.15.13
Running against Qt: 5.15.13
Compiled against GDAL: 3.11.0
Running against GDAL: 3.11.1



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


Versions, safeguards, checks summary etc

This is not relevant (I think) as the crashes happens before it is even possible to setup the plugin, which is/was installed from the plugin manger in QGIS, so is surely the latest version.

Check Lizmap plugin

  • [x] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

gioman avatar Jul 14 '25 19:07 gioman

Can anyone else confirm this?

gioman avatar Jul 23 '25 16:07 gioman

Hiya! This issue has gone quiet. 👻 We get a few issues, so we currently close issues after 60 days of inactivity. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Thanks for being a part of the Lizmap community! 🦎

github-actions[bot] avatar Sep 23 '25 04:09 github-actions[bot]

Still looking for some feedback from others.

gioman avatar Sep 23 '25 07:09 gioman

Ahh, interesting - i did not make the conclusion yet that my projects crash when a layer is missing due to Lizmap - but i have the problem of crashing QGIS projects with missing layers. I need to investigate with a profile without Lizmap and will report my findings soon!

meyerlor avatar Sep 27 '25 07:09 meyerlor

Ahh, interesting - i did not make the conclusion yet that my projects crash when a layer is missing due to Lizmap - but i have the problem of crashing QGIS projects with missing layers. I need to investigate with a profile without Lizmap and will report my findings soon

@meyerlor I think it happens when the missing (or unreachable) datasource is PostGIS.

gioman avatar Sep 29 '25 06:09 gioman