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.09k stars 2.93k forks source link

Removed services from datasourcemanager (WMS/WFS) reappear on next startup #56713

Closed CasperBertelsen closed 1 month ago

CasperBertelsen commented 4 months ago

What is the bug or the crash?

When adding a WMS service it appears under connections and qgis in the QGIS3.ini: [connections] ows\items\wms\connections\items\CONNECTIONNAME [qgis] connections-wms\CONNECTIONNAME connections\WMS\CONNECTIONNAME

When removing a service, it is removed by the [connections] tag but not the [qgis] tag, here comparing old and new ini-file

image image

Removing service: image

image

QGIS reopened and service reppears: image

I have noticed trying to remove several services that sometimes only some reappear.

Steps to reproduce the issue

New profile Add service Close QGIS Open QGIS Remove service Close QGIS Open QGIS

Versions

QGIS-version 3.34.4-Prizren QGIS-koderevision decd43dc Qt version 5.15.3 Python version 3.9.18 GDAL/OGR version 3.8.4 PROJ version 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.41.1 PDAL version 2.6.0 PostgreSQL klient version 16.1 SpatiaLite version 5.1.0 QWT version 6.1.6 QScintilla2 version 2.13.4 OS version Windows 10 Version 2009

Aktive Python plugins db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

agiudiceandrea commented 4 months ago

@CasperBertelsen, thanks for reporting. The issue has been already previously reported https://github.com/qgis/QGIS/issues/53321 and already allegedly recently fixed https://github.com/qgis/QGIS/pull/56586. The fix will be available in the upcoming QGIS 3.34.5 and 3.36.1 version. Please check if it is actually fixed using the new versions which will be available towards the end of this month.

github-actions[bot] commented 4 months ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

github-actions[bot] commented 3 months ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

MalikAlMaut commented 3 months ago

To add to this: Whenever QGIS is closed the lines under [qgis] are stored in the file. Opening QGIS removes this lines from the ini; closing adds these lines again. 3.36 does this very quickly, whereas 3.34 takes forever (depending on the amount of stored connections). One can also save the smaller file and open QGIS using the smaller file, but upon closing it, the lines are added again.

agiudiceandrea commented 3 months ago

@MalikAlMaut, what versions of QGIS are you using exactly?

MalikAlMaut commented 3 months ago

@MalikAlMaut, what versions of QGIS are you using exactly?

3.36.1-Maidenhead 3.34.5-Prizren

I don't know if this behaviour is new or wrong, but loading and closing QGIS did never take that long. It takes 3.34 LTR more than five minutes to open and close. There are almost 500 connections stored, for which QGIS writes and deletes over 8000 lines in the ini file.

agiudiceandrea commented 3 months ago

@3nids it seems the issue still occurs.

3nids commented 3 months ago

I just tested this and cannot replicate.

Could it be that you had 2 QGIS open at the same time?

PeterDrexel commented 2 months ago
QGIS-Version | 3.34.5-Prizren | QGIS-Codeversion | 4b308492 -- | -- | -- | -- Qt-Version | 5.15.3 Python-Version | 3.9.18 GDAL-Version | 3.8.4 PROJ-Version | 9.3.1 EPSG-Registraturdatenbankversion | v10.098 (2023-11-24) GEOS-Version | 3.12.1-CAPI-1.18.1 SQLite-Version | 3.41.1 PDAL-Version | 2.6.0 PostgreSQL-Client-Version | 16.2 SpatiaLite-Version | 5.1.0 QWT-Version | 6.1.6 QScintilla2-Version | 2.13.4 BS-Version | Windows 10 Version 2009   |   |   |   Aktive Python-Erweiterungen dimensioning | 0.2 mapswipetool_plugin | 1.2 MemoryLayerSaver | 5.0.2 pluginbuilder3 | 3.2.1 PluginLoadTimes | 4.0.2 plugin_reloader | 0.9.4 qfieldsync | v4.9.1 qgis_stac | 1.1.2 quick_map_services | 0.19.34 SpreadsheetLayers | 2.1.2 StreetView | 3.2 db_manager | 0.1.20 processing | 2.12.99 It still occurs here with a newly downloaded QGIS 3.34.5 LTR. QGIS shrinks the qgis3.ini on start und blows up the filesize again on closing. Both tages ages. It is fine with 3.36 ... QGIS-Version | 3.36.1-Maidenhead | QGIS-Codeversion | 3e589453 -- | -- | -- | -- and also with QGIS-Version | 3.37.0-Master | QGIS-Codeversion | 220abf7aa9 -- | -- | -- | -- (both OsGeo4W) Peter
stefan-overkamp commented 2 months ago

Same problem with 3.34.6-1 starting QGIS takes many minutes and ending it takes minutes to stop the process. I can confirm https://github.com/qgis/QGIS/issues/56713#issuecomment-2039364639 for 3.34.6-1

PeterDrexel commented 1 month ago

QGIS 3.34.7 on Win10 from today:

First try:

Second try:

QGIS 3.36.3:

No idea if this helps someone... Peter

agiudiceandrea commented 1 month ago

@3nids, I think the latest comment may help to find the root cause of the issue.

3nids commented 1 month ago

Described behavior is totally expected.

As previously wrote I cannot replicate the behavior of the OP. I suspect some older bugged versions of QGIS might have brought back some wrong configurations.

3nids commented 1 month ago

I could reproduce the issue and proposed a fix in #57727