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.55k stars 2.99k forks source link

Difference geoprocessing tool crashes #52186

Open johnellissenburton opened 1 year ago

johnellissenburton commented 1 year ago

What is the bug or the crash?

When I attempt to use the (vector) 'difference' geoprocessing tool to extract features from an input layer that lie outside the features on an overlay layer, the algorithm advances to 61% complete and then QGIS crashes without warning.

Steps to reproduce the issue

  1. Open QGIS 3.28.3 or 3.30.0 for Mac
  2. Open an input layer and an overlay layer, both in shapefile format and both using the EPSG:7844 coordinate reference system. Specifically: 'Indigenous Land Use Agreements' from http://www.nntt.gov.au/assistance/Geospatial/Pages/DataDownload.aspx (input layer: 76Mb) and 'Native Title Determination Outcomes' (overlay layer: 140Mb) from http://www.nntt.gov.au/assistance/Geospatial/Pages/DataDownload.aspx.
  3. Create spatial indexes for both layers if they don't exist.
  4. Vector > Geoprocessing tools > Difference ...
  5. Click 'Run' with default settings.
  6. 'Calculating difference' algorithm proceeds to 61% complete after ~4mins 50secs, QGIS crashes with no output.

Screenshot shows progress to 61% complete.

Screenshot 2023-03-12 at 11 59 47 am

Versions

QGIS version 3.30.0-'s-Hertogenbosch QGIS code revision f186b8efe0
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 13.2
       

Active Python plugins FreehandRasterGeoreferencer | 0.8.3 processing | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6

QGIS version 3.30.0-'s-Hertogenbosch QGIS code revision f186b8efe0 Qt version 5.15.2 Python version 3.9.5 GDAL/OGR version 3.3.2 PROJ version 8.1.1 EPSG Registry database version v10.028 (2021-07-07) GEOS version 3.9.1-CAPI-1.14.2 SQLite version 3.35.2 PDAL version 2.3.0 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.11.5 OS version macOS 13.2

Active Python plugins FreehandRasterGeoreferencer 0.8.3 processing 2.12.99 grassprovider 2.12.99 db_manager 0.1.20 MetaSearch 0.3.6

Supported QGIS version

New profile

Additional context

Running QGIS on a Mac Studio with 32Gb memory with 1.43Tb free on the SSD. Both layers and QGIS are on the local SSD. Activity monitor says 25.99Gb memory used out of 32Gb, QGIS using 1.87Gb, memory usage graph is flat. Activity monitor says QGIS is the main CPU user, CPU load is 14% max (idle 86%). Issue reproduced on QGIS 3.28.3 and 3.30.0. The crash appears to regularly occur when the progress bar reaches 61%. I don't think it varies.

nicogodet commented 1 year ago

Can't reproduce on Linux

Version de QGIS : 3.30.0-'s-Hertogenbosch
Révision du code : f186b8efe0
Version de Qt : 5.15.3
Version de Python : 3.10.6
Version de GDAL : 3.4.1
Version de GEOS : 3.10.2-CAPI-1.16.0
Version de Proj : Rel. 8.2.1, January 1st, 2022
Version de PDAL : 2.3.0 (git-version: Release)
Algorithme commencé à: 2023-03-12T08:44:58
Démarrage de l'algorithme 'Différence'…
Paramètres en entrée:
{ 'GRID_SIZE' : None, 'INPUT' : '/home/nicolas/Téléchargements/Native_Title_Nat_shp/Native_Title_Nat.shp', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'OVERLAY' : '/home/nicolas/Téléchargements/ILUA_Registered_Notified_Nat_shp/ILUA_Registered_Notified_Nat.shp' }

Creating spatial index
Calculating difference
Execution completed in 336.22 secondes (5 minutes 36 secondes)
Résultats:
{'OUTPUT': 'Diff_rence_7fa79378_8d56_4082_b10f_a97344f7be00'}

Chargement des couches de résultat
Algorithme 'Différence' terminé

Could be a side effect on out-dated libraries in macOS package.

agiudiceandrea commented 1 year ago

I cannot replicate the issue also on Windows.

johnellissenburton commented 1 year ago

I have now run this successfully on Ubuntu on the same machine so I would say it's a macOS problem. Thanks!

uclaros commented 1 year ago

Could be related to using GEOS 3.9.1

agiudiceandrea commented 1 year ago

Could be related to using GEOS 3.9.1

So it could be the same underlying issue of https://github.com/qgis/QGIS/issues/50888.