Bug report #7876

Vector Clip causes QGIS master crash

Added by Giovanni Manghi almost 11 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Processing/QGIS
Affected QGIS version:master Regression?:
Operating System: Easy fix?:
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:Yes Copied to github as #:16750

Description

try clip the attached point layer with the attached polygon layer.

QGIS will quickly start to eat memory (see attached screenshot) until the program crashes ("killed" in the terminal).

I'm using qgis master on Ubuntu 12.04 and I'm pretty sure is a regression ad in the past I have successfully clipped much more big/complex vectors.

https://www.dropbox.com/s/7anxpr1eygxvtwm/clip.tar.gz

44.png (316 KB) Giovanni Manghi, 2013-05-21 10:22 AM

Capture.JPG (44.6 KB) Giovanni Manghi, 2013-06-16 04:46 AM

clip_layer.zip (229 KB) Giovanni Manghi, 2013-06-16 04:46 AM

railways.zip (1.01 MB) Giovanni Manghi, 2013-06-16 04:46 AM

History

#1 Updated by Matthias Kuhn almost 11 years ago

  • Status changed from Open to Feedback

Please check if this was solved with the fixed memory leak in the OGR provider.

#2 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Feedback to Open
  • Subject changed from Memory leak in vector Clip in QGIS master to Vector Clip causes QGIS master crash
  • File railways.zip added
  • File clip_layer.zip added
  • File Capture.JPG added

Matthias Kuhn wrote:

Please check if this was solved with the fixed memory leak in the OGR provider.

The leak seems gone (thanks for that!), meanwhile it seems that now the tool causes qgis to crash (tested on osgeo4w for now, will do also on Linux) when the layer to be clipped is more than 20/30 MB.

I tested for example to clip the "buildings" or "roads" OSM layers (as shapefiles) of Portugal using a polygon representing 1 district.

The error that shows (before qgis crashing) is in the screenshot attached. On the other hand the "railways" layer clips ok with the same clip layer.

Samples files attached & linked (the buildings layer it too big to be attached).

http://d01.megashares.com/dl/A1qRHO8/buildings.zip

cheers

PS

The dataset linked in the original description seems anyway too heavy to be run/tested in a short time, at least on Windows. I will have to try on Linux.

#3 Updated by Giovanni Manghi almost 11 years ago

Matthias Kuhn wrote:

Please check if this was solved with the fixed memory leak in the OGR provider.

confirmed on Linux

giovanni@sibirica ~ $ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Fatal Python error: deallocating None
Aborted (core dumped)

#4 Updated by Mathieu Pellerin - nIRV almost 11 years ago

I've tried clipping buildings_3763 (buildings.zip) shapefile with the clip_layer (clip_layer.zip) shapefile, and QGIS is not crashing, as of commit f8d6e32.

Giovanni, can you give it a try again to see if the crash can still be reproduced with your machine?

#5 Updated by Giovanni Manghi almost 11 years ago

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

no more memory leak. Anyway the clip with the original posted dataset is very slow, but this is probably not a regression as all this vector tools are pretty inefficient with large data.

#6 Updated by Giovanni Manghi almost 7 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF