Bug report #5956

Crash when retrieving only null values for query

Added by Leyan Ouyang over 12 years ago. Updated over 12 years ago.

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

Description

Easy to reproduce:
  • Create a new shapefile, with a few features and at least one attribute than contains only NULL values.
  • Start a query on the layer and retrieve the possible values for this attribute.
  • QGis crashes

Maybe it is an OGR problem?

Backtrace:

#0  0xb62e75e6 in swq_select_summarize(swq_select*, int, char const*) ()
   from /usr/lib/libgdal.so
#1  0xb61994b0 in OGRGenSQLResultsLayer::PrepareSummary() ()
   from /usr/lib/libgdal.so
#2  0xb619b40e in OGRGenSQLResultsLayer::GetFeature(long) ()
   from /usr/lib/libgdal.so
#3  0xb619b54f in OGRGenSQLResultsLayer::GetNextFeature() ()
   from /usr/lib/libgdal.so
#4  0xb62199ef in OGR_L_GetNextFeature () from /usr/lib/libgdal.so
#5  0xadbc8c22 in QgsOgrProvider::uniqueValues (this=0x895c528, index=0, uniqueValues=..., limit=-1)
    at /home/koxinga/programmation/qgis/Quantum-GIS/src/providers/ogr/qgsogrprovider.cpp:2216
#6  0xb5aef64c in QgsVectorLayer::uniqueValues (this=0x9f69e80, index=0,     uniqueValues=..., limit=-1)
    at /home/koxinga/programmation/qgis/Quantum-GIS/src/core/qgsvectorlayer.cpp:5230


Related issues

Related to QGIS Application - Bug report #5196: QGIS crashes on style > categorized Closed 2012-03-17

History

#1 Updated by Giovanni Manghi over 12 years ago

  • Status changed from Open to Feedback

I cannot replicate. How do you do the query? can you attach sample data?

#2 Updated by Jürgen Fischer over 12 years ago

Maybe it is an OGR problem?

Yes, maybe. Which GDAL version are you using?

#3 Updated by Leyan Ouyang over 12 years ago

I was using Archlinux, gdal 1.9.0, released 2011/12/29

I just updated to gdal 1.9.1 and the crash disappeared.

To do the query, I simply right click on the layer and "Query..." and retrieve the values of the attribute.

#4 Updated by Jürgen Fischer over 12 years ago

  • Resolution set to upstream
  • Status changed from Feedback to Closed

Leyan Ouyang wrote:

I was using Archlinux, gdal 1.9.0, released 2011/12/29

I just updated to gdal 1.9.1 and the crash disappeared.

To do the query, I simply right click on the layer and "Query..." and retrieve the values of the attribute.

So probably a fixed upstream problem in GDAL 1.9.0.

Also available in: Atom PDF