Bug report #15445

QGIS crashes on layer.getFeatures(...) on request with order by

Added by Casper Børgesen over 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:PyQGIS Console
Affected QGIS version:master Regression?:No
Operating System:windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23371

Description

I have an example where QGIS (master: 1391aad) crashes when I run the following python script:

r = QgsFeatureRequest()
r = r.addOrderBy('FEAT_TYPE', True)
f = iface.mapCanvas().currentLayer().getFeatures(r)

To reproduce:

  1. Open QGIS.
  2. Load and select the attached shape file.
  3. Run the above code lines in the python console.

QGIS Crashes on the getFeatures(...) call. It says not responding... and finally crashes. It doesn't provide a minidump.

The same doesn't crash in QGIS 2.16.1.

I'm unsure which of the MASTER's I have to select with regards to "Affected Version".

TELEMAST.dbf (687 KB) Casper Børgesen, 2016-08-17 05:00 AM

TELEMAST.prj (407 Bytes) Casper Børgesen, 2016-08-17 05:00 AM

TELEMAST.shp (155 KB) Casper Børgesen, 2016-08-17 05:00 AM

TELEMAST.shx (28.3 KB) Casper Børgesen, 2016-08-17 05:00 AM

History

#1 Updated by Giovanni Manghi almost 8 years ago

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

Does not crash on 2.18.4 (2.18 will be the next LTR), so I assume is fixed. Please reopen of necessary.

Also available in: Atom PDF