Feature request #3457

Connect to WMS service should provide STOP/Cancel button

Added by marisn - about 6 years ago. Updated about 4 years ago.

Status:Open Start Date:
Priority:Low Due date:
Assigned to:Marco Hugentobler % Done:

0%

Category:WMS Client
Target version:Future Release - Nice to have
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info:0 Tag:

Description

When I choose not working WMS server from connections list and click "Connect" button, QGIS just hangs till socket times out.
It would be better to provide Stop/Cancel request button (ESC key) to stop current request and return to previous state.

History

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi almost 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by Sandro Santilli about 4 years ago

  • Platform deleted (Gentoo)
  • Pull Request or Patch supplied set to No

+1, I've just hit this one. Qgis enters what looks like an infinite loop here, actually (unless the timeout is really really long). The log continuosly show these lines:

Debug: src/providers/wms/qgswmsprovider.cpp: 1445: (capabilitiesReplyFinished) entering.
Debug: src/providers/wms/qgswmsprovider.cpp: 1448: (capabilitiesReplyFinished) reply ok
Debug: src/providers/wms/qgswmsprovider.cpp: 1460: (capabilitiesReplyFinished) redirected getcapabilities: http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities
Debug: src/core/qgsnetworkaccessmanager.cpp: 65: (queryProxy) using user proxy for http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities

CPU is 100% busy with that, no way to interrupt.
Seems to be done by background query because GUI refreshes just fine.

Updated by Sandro Santilli about 4 years ago

For the record, the url returns a 301 Moved Permanently, but points to self. So it's really the server exposing a loop.
For comparison, wget(1) gives up after the 20th redirect. QGis could do something similar (need another ticket?)

Updated by Sandro Santilli about 4 years ago

Final report: qgis eventually timed out (wow, it took a long time).
Log contains:

Debug: src/core/qgsmessagelog.cpp: 45: (logMessage) 2013-03-08T17:24:41 Network1 Network request http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?SERVICE=WMS&REQUEST=GetCapabilities timed out
...
Debug: src/providers/wms/qgswmsprovider.cpp: 1508: (capabilitiesReplyProgress) 0 of 0 bytes of capabilities downloaded.
Debug: src/providers/wms/qgswmsprovider.cpp: 1445: (capabilitiesReplyFinished) entering.
Debug: src/core/qgsmessagelog.cpp: 45: (logMessage) 2013-03-08T17:24:41 WMS1 Download of capabilities failed: Operation canceled
Debug: src/providers/wms/qgswmsprovider.cpp: 1372: (retrieveServerCapabilities) response is empty
Debug: src/providers/wms/qgswmsprovider.cpp: 4315: (lastError) returning 'Download of capabilities failed: Operation canceled'.

Updated by Sandro Santilli about 4 years ago

I've added a protection for simple redirect loops with 6795aef03cf4f9194abb1fabf90d998dd491aa33
Could not test against valid (non-looping) redirects as I don't know of any such service.

Also available in: Atom