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.39k stars 2.98k forks source link

Opening QGIS project hangs on KDE #46944

Closed ttreker closed 9 months ago

ttreker commented 2 years ago

What is the bug or the crash?

If a clean profile saves a project with a WMS layer, closes the project and then attempts to reopen it by selecting the project from the Recent Projects list, QGIS hangs indefinitely on the load of that layer showing in the load status. There are several workarounds that demonstrate a weirdness about this issue. These workarounds are ordered by easiest to kludgy:

Workarounds:

Steps to reproduce the issue

Produce the problem

  1. Create a fresh profile.
  2. Create an empty project.
  3. Load and Openstreetmap layer from the Data Source Manager XYZ Tiles datasource. (Note: This step is included only to provide geographical context. It has no effect on the problem one way or another).
  4. Load the attached spatial bookmarks xml file into the bookmarks and double click the bookmark. This should take you to an overview of the United States: Here is the file:

United States Bookmark.zip

  1. Load the following WMS data source using the Data Source Manager WMS/WMTS data source dialog:

https://hydro.nationalmap.gov/arcgis/services/wbd/MapServer/WMSServer

  1. Connect to this source.
  2. From the cababilities list (layer list) add 2-digit HU (Region) layer to the project layers above the Openstreetmap layer.
  3. Verify your GIS layers and view look approximately like the following:

Screenshot of setup )

  1. Save the project using whatever name is desired.
  2. Close the project.
  3. There should now be a Recent Projects list with a preview image matching the state in which the project was saved:

Screenshot of recent projects

  1. Click on this project.
  2. Observe the project hangs at the loading of the WMS layer:

Screenshot of hang

Versions

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.22.3-Białowieża | QGIS code revision | 1628765ec7 -- | -- | -- | -- Qt version | 5.15.2 Python version | 3.9.2 GDAL/OGR version | 3.2.2 PROJ version | 7.2.1 EPSG Registry database version | v10.008 (2020-12-16) GEOS version | 3.9.0-CAPI-1.16.2 SQLite version | 3.34.1 PDAL version | 2.2.0 PostgreSQL client version | 13.5 (Debian 13.5-0+deb11u1) SpatiaLite version | 5.0.1 QWT version | 6.1.4 QScintilla2 version | 2.11.6 OS version | Debian GNU/Linux 11 (bullseye)   |   |   |   Active Python plugins nominatim_locator_filter | 0.2.4 QuickOSM | 2.0.0 quick_map_services | 0.19.27 qgis_resource_sharing | 0.16.0 profiletool | 4.2.1 osminfo | 0.7.1 qgisnetworklogger | 0.2.0 latlontools | 3.5.10 grassprovider | 2.12.99 sagaprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.5 processing | 2.12.99

Supported QGIS version

New profile

Additional context

Weirdness

Why does a layer load hang if there is a preview image in the Recent Projects but only when there is a WMS layer in the project?

Note:

Workarounds

I noted the workarounds at the beginning of this bug report (See the original problem statement for these workarounds) to highlight the goofiness of this problem up front. There are three ways to approach it. The first in the list is the most practical from a usability perspective. The other two I put in there to demonstrate the connection to the preview image being the source. It seems to me they will provide developers with hints to the underlying cause of this weird bug.

Notes that Might Provide Some More Insight

It took a long time to track this down. The obvious places to look are data source/network, project conversions (the project this first occurred on was coming from QGIS 3.18) or maybe a flaky plugin. I started by working through all of these when it became clear that a fresh profile didn't fix it. Finally, I figured out the cause by saving profile folder trees at each stage of the process and diffing the trees. Even then, when I saw the only difference was the preview image I almost ignored that as being a possibility because it just seemed so unlikely.

Because I originally approached this by diffing the profile folder I was using for most of my effort to characterize the problem, the last technique of modifying the profile folder QGIS.ini file was what I used for most of my problem-tracking effort. I came across the second technique of the Advanced Editor when looking for a way to turn off the preview image. It only dawned on my while writing this report that perhaps if I didn't click on the Recent Projects project, and instead opened it from its source folder, this might work. It did! Seems this should be a further hint as to what is causing this issue.

ttreker commented 2 years ago

Under Weirdness Notes above, I should have said "If there is not a WMS layer" not "data source". Whether there is a WMS data source configured in the Data Source Manager doesn't matter. Only the layer matters.

gioman commented 2 years ago

Observe the project hangs at the loading of the WMS layer:

@ttreker cannot replicate, tested on Win10 and Linux Mint 20.

ttreker commented 2 years ago

Hmmm... I guess it would have to be tested under Debian Bullseye then.

@gioman do you guys not have a Debian Bullseye distro on a VM to test this? QGIS supports Debian and Ubuntu. Is Mint on that list? I realize it's ultimately a Debian derivative but Debian is the starting point for all of these distros:

Screenshot_QGIS Release Doc

Just to be clear here, I just went through a bug report with your team where I put a lot of effort into getting a Debian VM up to the latest supported configuration in order to test whether a bug existed in the latest version on a supported platform (it didn't and that closed the bug). In addition, I went through a detailed analysis of this current bug providing a lot of detail that should allow a developer on a setup that reproduces the bug to narrow in on the cause.

Testing on the specified platform if it is supported should be the default I would think.

Addendum to My Versions

Btw, I just noticed that configuration under Versions above shows plugins installed. This is incorrect and due to the fact that when I was writing this error report I had several QGIS profiles open and happened to copy the About from one that was not clean.

The tests were done with a fresh profile.

I'll repost this config in a subsequent comment if requested. All that is necessary in the previously posted About is to eliminate everything under Active Python plugins.

Btw, About doesn't show this but I also run under KDE. Here is KDE Info Center's report:

Operating System: Debian GNU/Linux 11 KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 Kernel Version: 5.10.0-11-amd64 OS Type: 64-bit Processor: 1 × Intel® Core™ i7-9850H CPU @ 2.60GHz Memory: 15.6 GiB of RAM Graphics Processor: llvmpipe

ttreker commented 2 years ago

Addendum to Workarounds

For anyone that experiences this same bug, there is a cleaner workaround than any that I originally posted. In particular my first workaround stated:

  • Ignore the recent projects list and instead use the file open dialog and navigate to the project of interest.

A quicker solution is to select the project from the Project->Open Recent menu (Alt-j R)

gioman commented 2 years ago

do you guys not have a Debian Bullseye distro on a VM to test this?

@ttreker https://www.osboxes.org/debian/

Anyway I tested it for you, and it does not hangs following the steps you describe.

QGIS supports Debian and Ubuntu. Is Mint on that list? I realize it's ultimately a Debian derivative but Debian is the starting point for all of these distros:

I don't understand what you mean. Debian is supported, as you show, but you also must read the notes, there is no QGIS >= 3.20 on Buster:

image

ttreker commented 2 years ago

@ttreker https://www.osboxes.org/debian/

Nice VM website reference. Thanks. Good to have in my back pocket.

I don't understand what you mean. Debian is supported, as you show, but you also must read the notes, there is no QGIS >= 3.20 on Buster:

I guess that I am confused myself. @gioman why do you think that I am running Buster? In case you were thinking about my last error post which was under Buster, I upgraded to Bullseye. I am current.

The moment I realized on my last error report that Buster was unsupported this caused me to upgrade my OS to Bullseye and get the latest QGIS. I should be current. If I am mistaken, please let me know. I don't want to be running you guys in circles. You were nice enough to indulge my last error report that was primarily a user misunderstanding on an unsupported OS. I appreciated that immensely. I want to be up to date and don't want to post any bug reports that are user errors. In addition I am being certain all my test are in clean profiles. I don't want to waste your time!

I did my best to ensure this was a clean bug report.

Anyway I tested it for you, and it does not hangs following the steps you describe.

Thank your for the test. This is greatly appreciated. I am concerned now, though, that maybe you tested it on Buster instead of Bullseye based on your above comment. It works fine on Buster. In hangs on Bullseye.

On which Debian version did you test it?

gioman commented 2 years ago

On which Debian version did you test it?

Bullseye. Can you test if a different machine or VM you observe the same?

ttreker commented 2 years ago

I'll look into the VM site you noted. It may be a couple of days until I can get to it.

ttreker commented 2 years ago

It Hangs Under KDE but Not Gnome

KDE Plasma appears to be the environment necessary to see this bug. (I wasn't expecting this :) )

How I Determined This

I suspect you can reproduce it now.

gioman commented 2 years ago

I suspect you can reproduce it now.

Yes I do.

It hangs from recent projects panel and D&D from OS file manager.

ok from project > recent and QGIS browser.

ttreker commented 2 years ago

I am not sure exactly what "D&D from OS file manager" means-- Click project file using Dolphin?

It seems I have occasionally had it hang on Project>Recent although I haven't been able to reproduce that at will.

I just tried a multitude of times clicking the project file in Dolphin and it always opened OK. It never hung.

gioman commented 2 years ago

I am not sure exactly what "D&D from OS file manager" means-- Click project file using Dolphin?

it means drag and drop, from the operating system file manager (dolphin for kde) to the QGIS canvas.

lucamanga commented 2 years ago

Which KDE version? I am on KDE Neon 5.25 (released this week).

This issue still exists as today?

alexbruy commented 11 months ago

Is this still an issue?

lucamanga commented 11 months ago

Not anymore

github-actions[bot] commented 10 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 9 months ago

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. Or, if you have any further questions, there are also further support channels that can help you.