Bug report #20459

QGIS freezes on Identifying Features

Added by Hans Omat over 1 year ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:-
Category:Map Tools
Affected QGIS version:3.4.1 Regression?:Yes
Operating System:OSX High Sierra Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:28279

Description

hi!

Since 3.4 we notice that QGIS keeps on performing "Identifying Features" after we move the map (pan or zoom).
There's a mouse popup saying: "Running (cannot cancel) Time elapsed: 9:55 minutes" (and counting)

If we click on the map window new Identify Feature requests are added to the list. All of them but the first one can be stopped.
We could even close the project and open another, but the first "Identifying Features" continues to run. No objects from the new project are loaded.
It's even not stopping if we want to close the Application - we can only force quit via operating system to stop QGIS.

Can we enable a more verbose mode to get you more details on the issue?

best regards, hans

identifying_features_lasting-forever.png - lasts forever (19.5 KB) Hans Omat, 2018-11-12 09:03 AM

popup_on_close.png - opens on close request (104 KB) Hans Omat, 2018-11-12 09:03 AM

open_tasks.png - Sceenshot with open tasks identifying (8.3 KB) Ralf Koenig, 2018-11-13 09:39 AM

test_data.zip - random polygons (41.4 KB) Ralf Koenig, 2018-11-13 09:43 AM

open_task_2.png (72.4 KB) Ralf Koenig, 2018-11-15 07:10 AM


Related issues

Related to QGIS Application - Bug report #19761: Unable to close QGIS because of an (ghost?) active task Closed 2018-09-03

Associated revisions

Revision 57c117cd
Added by Nyall Dawson over 1 year ago

Remove progress task from identify action

Seems that some providers trigger an issue with the progress task
(likely due to a local event loop running on the main thread triggering
a processEvents call).

Workaround the issue by just removing the progress task -- it's
unlikely to be missed anyway.

Fixes #20459

Revision 073c5be6
Added by Nyall Dawson over 1 year ago

Remove progress task from identify action

Seems that some providers trigger an issue with the progress task
(likely due to a local event loop running on the main thread triggering
a processEvents call).

Workaround the issue by just removing the progress task -- it's
unlikely to be missed anyway.

Fixes #20459

(cherry picked from commit 57c117cdf4271e1e37ea0f103db1f8fd2a61fc2b)

History

#1 Updated by Harrissou Santanna over 1 year ago

  • Related to Bug report #19761: Unable to close QGIS because of an (ghost?) active task added

#2 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Open to Feedback
  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from No to Yes

So this was not the case on 3.2?

#3 Updated by Hans Omat over 1 year ago

Giovanni Manghi wrote:

So this was not the case on 3.2?

We have used all versions since 3.0 - didn't notice this in 3.2.

After playing around to get an idea how this can be reproduced it appears in (at least) the following scenario:

  • As long as we use "Identify Feature" immediately after the project is loaded (map not panned/zoomed) everything works fine. It doesn't matter if there's actually a feature at clicked place or not.
  • If we then move the map window (pan/zoom -> rendering) and try to click on a feature the mentioned "permanent" Identifying Feature task appears. We can still click on features and get the info.
  • If then the map is moved (-> rendering) the map window get's empty. We can only "Force Quit" QGis then.

We tried different modes ("Current Layer"; "Top down, stop at first"), but that makes no difference.

#4 Updated by Giovanni Manghi over 1 year ago

  • Category changed from GUI to Map Tools
  • Regression? changed from No to Yes

Cannot replicate this.

Can we exclude a problem that depends on the data (does it happen with any project/data?) or 3rd party plugins (does it happen on a new/clean profile?)?

#5 Updated by Hans Omat over 1 year ago

Giovanni Manghi wrote:

Cannot replicate this.

Can we exclude a problem that depends on the data (does it happen with any project/data?) or 3rd party plugins (does it happen on a new/clean profile?)?

  • We can certainly exclude that it's machine related: it happens on systems with High Sierra and Mojave (both with version 3.4.x).
  • Plugins can be excluded - we only have one non core plugin (OSM tools) installed on one of the machines.
  • Data (structure) hasn't changed for years - so don't expect anything from there.
  • Projects last for years as well, just upgraded to new version. Projects are shared across machines on OS level.

Yet that doesn't mean it's not related to the data/project. All projects are complex with many entries. All data resides in Postgres with some WMTS layers as background. So complexity (or intensive data loads on re-rendering) is something I wouldn't exclude as a reason.
Just did a small project and was not able to reproduce (still needs more testing).

Is there any tracing we could switch on? Still wondering WHAT feature or layer the Identify Feature task is trying to a touch?

#6 Updated by Giovanni Manghi over 1 year ago

Is there any tracing we could switch on? Still wondering WHAT feature or layer the Identify Feature task is trying to a touch?

have you tried to see if disabling the geometry/topology checks in the layers makes any difference?

#7 Updated by Nyall Dawson over 1 year ago

Can you narrow down which layer type caused the issue?

#8 Updated by Hans Omat over 1 year ago

have you tried to see if disabling the geometry/topology checks in the layers makes any difference?

not found - where can I disable this?

#9 Updated by Ralf Koenig over 1 year ago

I could reproduce the issue this way (qgis 3.4.1):

Fresh project. Generated a fresh random-point-dataset. With this a buffer-polygon temp. shp-dataset. Made this permanent as shp. Deleted the point-dataset.
Added a vrt. Project hat now 2 layers (random polygons and vrt):

It seems it is affected by a vrt (aerial photos) in the background.

After about 250 identify-klicks qgis hangs or crashes. Without the vrt it was not easy to reproduce the issue.

Sometimes qgis crashes sometimes it hangs with several open tasks which can not be aborted (only ctrl/alt/del helps), sometimes there is a crash.

#10 Updated by Hans Omat over 1 year ago

Ralf Koenig wrote:

I could reproduce the issue this way (qgis 3.4.1):
Fresh project. Generated a fresh random-point-dataset. With this a buffer-polygon temp. shp-dataset. Made this permanent as shp. Deleted the point-dataset.
Added a vrt. Project hat now 2 layers (random polygons and vrt):
It seems it is affected by a vrt (aerial photos) in the background.
After about 250 identify-klicks qgis hangs or crashes. Without the vrt it was not easy to reproduce the issue.
Sometimes qgis crashes sometimes it hangs with several open tasks which can not be aborted (only ctrl/alt/del helps), sometimes there is a crash.

We tried something similar and had been able to reproduce it using the following scenarios:

I'd say it's the combination of normal vector layers paired with WMS/WMTS or raster in general.

#11 Updated by Tobias Wendorff over 1 year ago

Hans Omat wrote:

Since 3.4 we notice that QGIS keeps on performing "Identifying Features" after we move the map (pan or zoom).
There's a mouse popup saying: "Running (cannot cancel) Time elapsed: 9:55 minutes" (and counting)

I can verify this on Windows 7 and Windows 10. Somtimes it takes minutes to have a vector feature identified. And sometimes the dialogbox suddenly appears for a feature, you've clicked on a long time ago.

#12 Updated by Giovanni Manghi over 1 year ago

We tried something similar and had been able to reproduce it using the following scenarios:

I'd say it's the combination of normal vector layers paired with WMS/WMTS or raster in general.

I just tested this scenario here (linux) and can't trigger any issue.

#13 Updated by Ralf Koenig over 1 year ago

Made another check on windows 7, qgis 3.4.1 again:
fresh project,
first step: added 1 postgresql-polygon layer (13.500 rows, 19 columns) -> with about 300 identify-clicks over and beside features : no problem

second step: added a random wms (https://www.wms.nrw.de/geobasis/wms_nw_dgm-schummerung) -> just a few klicks: several open identify tasks (-> open_task_2.png), which can not be stopped

#14 Updated by Hans Omat over 1 year ago

I'd say it's the combination of normal vector layers paired with WMS/WMTS or raster in general.

I just tested this scenario here (linux) and can't trigger any issue.

Is there anything what can be done on our side? We unfortunately can't fix the problem ourself, but are on stand-by to identify the issue.
In our case it happen "seconds" after launching QGIS. This makes 3.4 unusable to us, but maybe it's still helpful to narrow down the problem.

#15 Updated by Giovanni Manghi over 1 year ago

Hans Omat wrote:

I'd say it's the combination of normal vector layers paired with WMS/WMTS or raster in general.

I just tested this scenario here (linux) and can't trigger any issue.

Is there anything what can be done on our side?

https://www.qgis.org/en/site/forusers/commercial_support.html

#16 Updated by Hans Omat over 1 year ago

Giovanni Manghi wrote:

Is there anything what can be done on our side?

https://www.qgis.org/en/site/forusers/commercial_support.html

So this means it's not accepted as a general bug (at least on Windows and OSX) ?

#17 Updated by Giovanni Manghi over 1 year ago

So this means it's not accepted as a general bug (at least on Windows and OSX) ?

If is a confirmed bug (it does not matter if is platform specific or not) then of course is accepted.

What I meant is that what is a blocker for the workflow of someone could not be a blocker at all for the majority of users, or in this case it seems that it has not yet been discovered the real factor that triggers the problem (I and others can't replicate). If this issue is a blocker for your workflow then you can consider hiring a developer to go to the bottom of the problem and fix it.

#18 Updated by Hans Omat over 1 year ago

Giovanni Manghi wrote:

... in this case it seems that it has not yet been discovered the real factor that

That's exactly what I've asked for: what can be done by us (affected, but "non-experts") to support the experts/programmers.

I agree it's not very helpful if we all start describing our setup. Ralf also provided the sources to reenact his situation (thanks for that!). Doubt that you have time left to replay all those setups.
Question therefore: Is there exemplary a verbose mode we could enable, is there a logging which could be collected, ...?

#19 Updated by Andreas Neumann over 1 year ago

Not a solution - but it might be a workaround:

I assume you are not interested in identifying raster values in the VRT - is this correct?

If yes, you can disable that these layers can be identified at all. Go to Project --> Properties --> Tab "Data Sources" and uncheck "Identifiable".

Uncheck for every layer you are not interested in identifying features.

I know - this is not solving your issue, but it may help as a workaround. It will also speed up identifying features, if some layers can be excluded from the start.

Thanks for your feedback if this helps?

#20 Updated by Nyall Dawson over 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

#21 Updated by Hans Omat over 1 year ago

Nyall Dawson wrote:

Applied in changeset qgis|57c117cdf4271e1e37ea0f103db1f8fd2a61fc2b.

Just tested version 3.4.2-1. Looks good, no more freezes so far.
Thanks Nyall. And thanks to all who contributed.

Also available in: Atom PDF