qgis-js
qgis-js copied to clipboard
Loading a WMS/WMTS layer causes infinite loop
If the QGIS project uses a WMS / WMTS layer, the project loading will get stuck, with this warning being emitted all the time:
QEventLoop::WaitForMoreEvents is not supported on the main thread without asyncify
This is likely due to the fact that the WMS provider is doing a synchronous blocking GetCapabilities call in the constructor.
Given that we're using QGIS 3.32 in the builds, we could try to add QgsProviderMetadata::ParallelCreateProvider to WMS metadata (QgsWmsProviderMetadata::providerCapabilities()) to get the provider loaded in a worker thread, rather than creating it in the main thread. (But we'll probably still be affected by networking issues as in #3)