qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.35k stars 2.98k forks source link

QGIS freezes when adding a legend in composer and project has a WMS layer with a missing graphic legend #20421

Closed qgib closed 5 years ago

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles) Original Redmine Issue: 12234 Affected QGIS version: master Redmine category:map_composer/printing


Loading WMS Layer (contains sub-Layers, see atttached jpg --->Nr. 5) p.e. from http://www.gis-schweich.de/service_schweich_on/mod_wms/wms_getmap.php?mapfile=07235015&

works fine in QGIS 2.6.1.

Loading the same layer Nr. 5 in QGIS-dev, it freeze, when you use a project from older version. Loading the same layer in a new project created in QGIS-dev, the layer loads, but the legend grafik reports a fault. Loading one of the sub-layers (e.g. Nr. 6 or any other), works fine.


qgib commented 9 years ago

Author Name: Jürgen Fischer (@jef-n)


Loading the WMS layer from a 2.6.1 project or directly in master works fine for me. The legend @GetLegendGraphics@ request is:

http://www.gis-schweich.de/service_schweich_on/mod_wms/wms_getmap.php?mapfile=07235015&&SERVICE=WMS&VERSION=1.1.1&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=BPLAN.07235015&STYLE=

The server response is:

<ServiceExceptionReport version="1.1.1"><ServiceException code="LayerNotDefined">
msWMSGetLegendGraphic(): WMS server error. Invalid layer given in the LAYER parameter.
</ServiceException></ServiceExceptionReport>

although the request looks good to me and corresponds to the layer name used in the working @GetMap@ request:

http://www.gis-schweich.de/service_schweich_on/mod_wms/wms_getmap.php?mapfile=07235015&&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=6.83373245779695715,49.8168997392995152,6.86000248737879126,49.82823769654798696&SRS=EPSG:4326&WIDTH=1513&HEIGHT=653&LAYERS=BPLAN.07235015&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE
qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Attached a sample testproject. It was created by QGIS <2.6. and last saved in QGIS 2.9

The wms url for the WMS-conection in QGIS s: http://www.gis-schweich.de/service_schweich_on/mod_wms/wms_getmap.php?mapfile=07235004&

When you try to add a wms layer, QGIS stop working.



qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


after a few tests I would say that this ticket seems somehow related to #20362 and #20319.

see the attcahed project "test_wms2" and "test_wms3", without and with a composer layout.



qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Confirm, that the composer entries make the trouble. But it is not a delay! When you open projects created with release 2.6 or < which contains composer items with Release 2.8 or in dev, QGIS stop working, no menue is available and you can only close QGIS click on the "cross bar" in the program window.

We are a little city civil-administration and have many projects with complex composer items. It would not be a good idea to remove all composer items.

Ist there another solution possible?

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


Gerhard Spieles wrote:

Confirm, that the composer entries make the trouble. But it is not a delay! When you open projects created with release 2.6 or < which contains composer items with Release 2.8 or in dev, QGIS stop working, no menue is available and you can only close QGIS click on the "cross bar" in the program window.

We are a little city civil-administration and have many projects with complex composer items. It would not be a good idea to remove all composer items.

Ist there another solution possible?

I added as watcher of this ticket the developer that made the bulk of the work on the composer lately, maybe he could try to figure where is the real source of the issue.

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Is the status "Feedback" ok?

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


Gerhard Spieles wrote:

Is the status "Feedback" ok?

the title should be changed to better described the issue, that has nothing to do with WMS layers. What do you suggest?


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


I agree. Proposal for new title: QGIS freeze, using a project from previous version with composer entries when adding a wms layer

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Nyall Dawson (@nyalldawson)


Please test with latest dev version and let me know if this is now fixed


qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


Nyall Dawson wrote:

Please test with latest dev version and let me know if this is now fixed

Hi Nyall,

it just updated to the latest master (nightly build repo for Ubuntu) and I can't see any difference.The attached project with composers take a lot of time to load (so much you can call it a freeze), without composers it opens very quickly.

Then the issues seems the same as above:

http://www.gis-schweich.de/service_schweich_on/mod_wms/wms_getmap.php?mapfile=07235015

and then save/load the project is quick

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Tested it on windows with QGIS-dev, rev. 733b7c9. Problem exist further

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Hi Giovanni, is it possible to change the status after the feedback? Thanks

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


If we can say that this is a regression (as it seems to me) then we can tag this as blocker. At the moment I lack the time to do the proper tests with different qgis versions on different platforms.


qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Nyall Dawson (@nyalldawson)


Please test and give feedback with latest master (06732f137357ff1f3c2a55a3253037d8df85596b)


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Tested QGIS-Codeversion 06732f1 without success

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Testing the problem in detail show, that following elements in the composers make the stress:

When you delete these elements in the composers, save the project again and then you can add wms-layers fine.

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Hi Giovanni, when you add a legend in composer again, the poblem is back again. The issue schould be solved in 2.10.

Please change the target version to 2.10 Thanks

Gerhard

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Tested the problem with a newly creates Project in 2.90, rev. e8587c3. If a legend elemet is added to any composer in the newly created Project, then QGis freeze, when you add a WMS-Layer.

I think, this is a blocker for for the 2.10 Release and also the 2.8LTR.

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


Gerhard Spieles wrote:

Tested the problem with a newly creates Project in 2.90, rev. e8587c3. If a legend elemet is added to any composer in the newly created Project, then QGis freeze, when you add a WMS-Layer.

I think, this is a blocker for for the 2.10 Release and also the 2.8LTR.

it happens only if the legend of WMS layer is not loaded (probably for a Server misconfiguration).

Attached a sample project, just add the legend int he composer and qgis freezes.



qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Confirm, that the missing legend-grafic in wms seems to lead to freeze QGIS, when a legend-element is in a composer. Unfortunately, WebMapServices are verry often not porber configured in legend-grafic.

QGIS should handle this, without freezing! Until Version 2.6, this was no problem an QGIS handled it.

Is it possible to solve this problem in 2.10? Verry much Thanks

Gerhard

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Hello Giovanni, should we change -the title to "QGIs freeze, adding a wms layer with missing legend grafic and any composer contains a legend" -categorie to "Map Composer/Printing" -Target Version to Version 2.10

Thanks

qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Hello Giovanni,

we corrected our wms serverconfiguration (see #24)and can now use it with QGIS.

Unfortunately, many WMS-Services have the legend-grafic fault. We have no influence to the sercices. Samples are in the attached "wms_without_legend_grafic.jpg".

Is it possible to solve the problem in 2.10?

Thanks

Gerhard



qgib commented 9 years ago

Author Name: Giovanni Manghi (@gioman)


Gerhard Spieles wrote:

Hello Giovanni,

we corrected our wms serverconfiguration (see #24)and can now use it with QGIS.

Unfortunately, many WMS-Services have the legend-grafic fault. We have no influence to the sercices. Samples are in the attached "wms_without_legend_grafic.jpg".

Is it possible to solve the problem in 2.10?

Thanks

Gerhard

Hi, I listed this ticket among the ones I suggest to urgently solve in the bug fixing effort pre-release.

Please also raise this matter on the developers list.

qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Hi, how can i do this and bring the issue it to the developpers list?

Thanks Gerhard

qgib commented 9 years ago

Author Name: Nyall Dawson (@nyalldawson)


Can someone please post an example of one of these misconfigured WMS servers? I can't replicate this using any of the attached projects.


qgib commented 9 years ago

Author Name: Gerhard Spieles (Gerhard Spieles)


Here a wms url

http://geodaten.service24.rlp.de/cgi-bin/RLP_VBORISFREE2014.cgi?

A test project is attached. When you add a legend item to the composer, then QGIS freeze.



qgib commented 9 years ago

Author Name: Nyall Dawson (@nyalldawson)


Fixed in changeset "4f29c58e4357fad505c82459e97c17449bf4891b".