Bug report #8232
QgsVectorDataProvider.uniqueValues() crash if there is a NULL value in selected index field
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Linux | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | up-/downstream |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17044 |
Description
If there are NULL values in field of a shapefile, the python Qgis API method
QgsVectorDataProvider.uniqueValuesraises a segmentation fault.
There is sample dataset attached and a python standalone minimal application that shows the bug.
Associated revisions
History
#1 Updated by Daniel Vaz over 11 years ago
This bug was found while attempt to solve the bug #8219.
#2 Updated by Daniel Vaz over 11 years ago
- File bug8232.cpp added
The main cause is underlying c++ code. The following code attached shows the bug in c++
#3 Updated by Jürgen Fischer over 11 years ago
- Resolution set to up-/downstream
apparently a GDAL/OGR problem:
$ ogrinfo -sql 'SELECT DISTINCT "name" FROM "polygons" ORDER BY name ASC' . INFO: Open of `.' using driver `ESRI Shapefile' successful. Layer name: polygons Geometry: Polygon Segmentation fault (core dumped)
#4 Updated by Jürgen Fischer over 11 years ago
- Subject changed from Python API QgsVectorDataProvider.uniqueValues() crash if there is a NULL value in selected index field to QgsVectorDataProvider.uniqueValues() crash if there is a NULL value in selected index field
#5 Updated by Jürgen Fischer over 11 years ago
- Category changed from Python plugins to Vectors
#6 Updated by Jürgen Fischer over 11 years ago
Reproducable with GDAL 1.9, but not 1.10.
#7 Updated by Daniel Vaz over 11 years ago
I think that bug was fixed in GDAL #4509
#8 Updated by Jürgen Fischer over 11 years ago
- Status changed from Open to Closed
Fixed in changeset bf1d1b0453ba5bc274cc3a960a2cb6de4e061ee4.