Bug report #17087
WFS provider deadlock (freezes forever waiting for mMutex to unlock)
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Even Rouault | ||
Category: | Web Services clients/WFS | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 24986 |
Description
Steps to reproduce:
- a WFS endpoint is needed (tested with both geoserver and qgis server with same results)
- connect to the WFS server and load a layer in QGIS
- from the python cosole get the publicSource of the layer , for example with iface.currentLayer().publicSource() (in the example below it is 'restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'world\' url=\'http://localhost:8081/cgi-bin/qgis_mapserv.fcgi?MAP=/web/projects/helloworld.qgs\' version=\'auto\' table="" sql='
- from the python console inside QGIS (change the source to your valid WFS public source)
vl = QgsVectorLayer('restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'world\' url=\'http://localhost:8081/cgi-bin/qgis_mapserv.fcgi?MAP=/web/projects/helloworld.qgs\' version=\'auto\' table="" sql=', 'mywfs', 'WFS'); QgsProject.instance().addMapLayers([vl]) and [f for f in vl.dataProvider().getFeatures()]
Expected behavior:
- QGIS loads the layer in the canvas
Actual behavior:
- QGIS freezes forever
Related issues
Associated revisions
Merge pull request #5085 from boundlessgeo/wfs_mutex_offline
Offline editing: workaround for bug 17087 deadlock
[WFS provider] Fix deadlock when adding WFS layer to project from Python console (fixes #17087)
[WFS provider] Fix deadlock when adding WFS layer to project from Python console (fixes #17087)
History
#1 Updated by Alessandro Pasotti about 7 years ago
- Regression? changed from Yes to No
It also affects 2.18
vl = iface.addVectorLayer('user=\'admin\' restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'opengeo:countries\' url=\'http://localhost:8080/geoserver/wfs\' version=\'auto\' table="" sql=', 'mywfs', 'WFS'); [f for f in vl.dataProvider().getFeatures()]
#2 Updated by Alessandro Pasotti about 7 years ago
QGIS Server Docker to reproduce the issue:
https://github.com/elpaso/qgis-server-docker
docker pull elpaso/qgis-server-docker
#3 Updated by Alessandro Pasotti about 7 years ago
See also #17019 (for the master freeze)
#4 Updated by Jürgen Fischer about 7 years ago
- Related to Bug report #17019: Off-line editing does not work with WFS-T layers with mixed simple and multi geoms added
#5 Updated by Even Rouault about 7 years ago
- Assignee set to Even Rouault
#6 Updated by Even Rouault about 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|75c41f5e18f32dcf3ce7fd7c13b3838e8e7912db.