Bug report #19436

High memory usage with Snap geometries to layer and "exception:unknown" message

Added by Antoine Lafranchis over 5 years ago. Updated about 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Digitising
Affected QGIS version:3.7(master) Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27264

Description

In some circumstances, the computer freezes with 99.9% memory usage (then task manager stops responding...) when using the algorithm 'Snap geometries to layer'.
It apparently happens only when snapping a line layer to a point reference layer, with a small tolerance (0.00001 or lower).
It happend initially on a huge shapefile with geometry errors, but then I could reproduce it with tempopary layers: a line layer with a single line and a point layer with 3 points: the 1st point was precisely on a vertex, the 2nd point close to a second vertex (within the tolerance radius) and the 3rd point quite far from the line.

Because I had to "brutally" shut down and restart the computer, I don't have any test file to attach and no crash log. The only details that were left were the processing history:

processing.run("qgis:snapgeometries", {'INPUT':'Point?crs=EPSG:4326&uid={50146ea0-3a7a-4515-8241-e842f2ef1717}','REFERENCE_LAYER':'LineString?crs=EPSG:4326&uid={c6586332-d416-495e-868d-e34430dab439}','TOLERANCE':1e-5,'BEHAVIOR':0,'OUTPUT':'memory:'})

test_project.qgz (3.74 KB) Antoine Lafranchis, 2019-02-23 08:59 PM

test_memory_usage.png (142 KB) Antoine Lafranchis, 2019-02-23 08:59 PM

QGIS.zip - Shapefiles (2.99 KB) Antoine Lafranchis, 2019-02-23 09:08 PM

test_snap_config.png (103 KB) Antoine Lafranchis, 2019-02-23 09:08 PM

qgis_version.png - qgis version (25.1 KB) Antoine Lafranchis, 2019-02-23 09:34 PM

qgis_snap_exception.png - exception message (108 KB) Antoine Lafranchis, 2019-02-23 09:42 PM

History

#1 Updated by Nyall Dawson over 5 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

Duplicate of #18497

#2 Updated by Antoine Lafranchis about 5 years ago

I still experience abnormally high memory usage and Qgis freezing when snapping points to lines with small tolerance.
This time i ended qgis-dev from the task manager without waiting for the probable crash so that i could send this update.
Memory usage was at 2.5 GB and continuously increasing. The 2 shapefiles contain only 6 features in total.
It's apparently not a duplicate of #18497 which is fixed.

#3 Updated by Giovanni Manghi about 5 years ago

  • Resolution deleted (duplicate)
  • Status changed from Reopened to Feedback

Antoine Lafranchis wrote:

I still experience abnormally high memory usage and Qgis freezing when snapping points to lines with small tolerance.
This time i ended qgis-dev from the task manager without waiting for the probable crash so that i could send this update.
Memory usage was at 2.5 GB and continuously increasing. The 2 shapefiles contain only 6 features in total.
It's apparently not a duplicate of #18497 which is fixed.

sure have you tested a recent build?

#4 Updated by Antoine Lafranchis about 5 years ago

I use build 4d5dad8172.
I tried again to snap the same layers and waited. It didn't actually crash, memory usage peaked at 2.6 GB then dropped suddenly and displayed an "exception:unknown" message.

#5 Updated by Giovanni Manghi about 5 years ago

  • Category changed from Processing/Core to Digitising
  • Status changed from Feedback to Open
  • Priority changed from High to Normal
  • Affected QGIS version changed from 3.2 to 3.7(master)
  • Crashes QGIS or corrupts data changed from Yes to No
  • Subject changed from Windows crash with Snap geometries to layer to High memory usage with Snap geometries to layer and "exception:unknown" message

Also available in: Atom PDF