Bug report #5735

Categorized style causes crash with NULLs

Added by Paolo Cavallini over 12 years ago. Updated over 10 years ago.

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

Description

Load http://int.faunalia.it/~paolo/tempdata.zip
Properties>Style>Categorized>Value>Bang!
<class 'qgis.core.QgsVectorLayer'>
Errore di segmentazione
Note: all Values are NULL

It appears to be a regression, so it should be a blocker. Please downgrade it if not.

See also crash categorizing NULLs

History

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

Is that part of the error message?

<class 'qgis.core.QgsVectorLayer'>

did you try without non-core plugins?

#2 Updated by Paolo Cavallini over 12 years ago

Yes, same result when started --noplugins

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

Paolo Cavallini wrote:

Yes, same result when started --noplugins

not reproducable here - please include a backtrace of the segfault.

#4 Updated by Martin Dobias over 12 years ago

Not reproducible here either.

Btw. there is no NULL in any feature's "value" field in provided data

#5 Updated by Giovanni Manghi over 12 years ago

I get the crash under Ubuntu/qgis-master

gio@sibirica:~$ qgis --noplugins
Warning: loading of qgis translation failed [/usr/share/qgis/i18n//qgis_en_US]
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: QHttp: empty path requested is invalid -- using '/'
<class 'qgis.core.QgsVectorLayer'>
Segmentation fault (core dumped)

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

Giovanni Manghi wrote:

I get the crash under Ubuntu/qgis-master

[...]
Segmentation fault (core dumped)

Backtrace please.

#7 Updated by Giuseppe Sucameli over 12 years ago

No crashes here, but the terminal displays the following error message:

ERROR 1: SQL Expression Parsing Error: syntax error

It seems to me the output of a GDAL error, maybe the crash depends on the GDAL version.

I'm on Ubuntu 11.04, QGis master, GDAL 1.8

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

Giuseppe Sucameli wrote:

No crashes here, but the terminal displays the following error message:
[...]

<class 'qgis.core.QgsVectorLayer'>

also looks suspicious. Does that message appear right before the crash or earlier?

#9 Updated by Salvatore Larosa over 12 years ago

Not reproducible here:

QGIS version 1.8.0-Lisboa
QGIS code revision 21ce807
Compiled against Qt 4.8.1
Running against Qt 4.8.1
Compiled against GDAL/OGR 2.0dev
Running against GDAL/OGR 2.0dev
GEOS Version 3.3.3
PostgreSQL Client Version 9.1.3
SpatiaLite Version 3.0.1
QWT Version 5.2.2

#10 Updated by Werner Macho over 12 years ago

Not confirmed here with provided testdata.

Debian

QGIS version 1.8.0-Lisboa
QGIS code revision 78701d8
Compiled against Qt 4.8.1
Running against Qt 4.8.1
Compiled against GDAL/OGR 1.9.0
Running against GDAL/OGR 1.9.0
GEOS Version 3.3.1
PostgreSQL Client Version 9.1.3
SpatiaLite Version 3.0.0-beta
QWT Version 5.2.2
This copy of QGIS writes debugging output.

#11 Updated by Paolo Cavallini over 12 years ago

It may well be a compilation problem - now compiling and testing.

#12 Updated by Paolo Cavallini over 12 years ago

  • Priority changed from Severe/Regression to Normal

Nope, recompiled, same crash. Must be a local issue.

#13 Updated by Giovanni Manghi over 12 years ago

Paolo Cavallini wrote:

Nope, recompiled, same crash. Must be a local issue.

I also get the crash on ubuntu using the nightly build repo so it is not a local problem and if does not affects 1.7.4 it is a regression

#14 Updated by Paolo Cavallini over 12 years ago

<class 'qgis.core.QgsVectorLayer'> appears at the end of QGIS loading (only when plugins are on).

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

Would anyone who can actually produce the crash please also create a backtrace.

#16 Updated by Larry Shaffer over 12 years ago

Not reproducible here with Mac OS X 10.7.4

QGIS version 1.8.0-Lisboa
QGIS code revision 21ce807
Compiled against Qt 4.8.2
Running against Qt 4.8.2
Compiled against GDAL/OGR 1.9.0
Running against GDAL/OGR 1.9.0
GEOS Version 3.3.2dev
PostgreSQL Client Version 9.1.3
SpatiaLite Version 2.4.0
QWT Version 5.2.2

#17 Updated by Paolo Cavallini over 12 years ago

Program terminated with signal 11, Segmentation fault.
#0  0x00007f83a514d1b3 in swq_select_summarize(swq_select*, int, char const*) () from /usr/lib/libgdal.so.1
#1  0x00007f83a4fc44e2 in OGRGenSQLResultsLayer::PrepareSummary() () from /usr/lib/libgdal.so.1
#2  0x00007f83a4fc63a5 in OGRGenSQLResultsLayer::GetFeature(long) () from /usr/lib/libgdal.so.1
#3  0x00007f837db30441 in QgsOgrProvider::uniqueValues(int, QList<QVariant>&, int) () from /usr/lib/qgis/plugins/libogrprovider.so
#4  0x00007f83a45813f3 in QgsVectorLayer::uniqueValues(int, QList<QVariant>&, int) () from /usr/lib/libqgis_core.so.1.8.0
#5  0x00007f83a3ee9e8b in QgsCategorizedSymbolRendererV2Widget::addCategories() () from /usr/lib/libqgis_gui.so.1.8.0

#18 Updated by Giovanni Manghi over 12 years ago

Paolo Cavallini wrote:

[...]

I just updated master on ubuntu and I have still the crash. I tested also to change all the values of the "label" column except one, and I still have the crash. On Windows is works ok. This is how the "about" looks like for me


QGIS version 1.8.0-Lisboa
QGIS code revision exported
Compiled against Qt 4.8.1
Running against Qt 4.8.1
Compiled against GDAL/OGR 1.9.0
Running against GDAL/OGR 1.9.0
GEOS Version 3.2.2
PostgreSQL Client Version 9.1.4
SpatiaLite Version 3.0.0-beta
QWT Version 5.2.2

I would not consider this as "normal", at least until further investigations.

#19 Updated by Martin Dobias over 12 years ago

The backtrace suggests that it might be a GDAL/OGR bug. Would you mind to try QGIS with a different version of GDAL? ... although some others running 1.9.0 seem not to be affected

#20 Updated by Giovanni Manghi over 12 years ago

Martin Dobias wrote:

The backtrace suggests that it might be a GDAL/OGR bug. Would you mind to try QGIS with a different version of GDAL? ... although some others running 1.9.0 seem not to be affected

I installed qgis-master compiled against gdal 1.7.3 and no crash

QGIS version 1.8.0-Lisboa
QGIS code revision exported
Compiled against Qt 4.8.1
Running against Qt 4.8.1
Compiled against GDAL/OGR 1.7.3
Running against GDAL/OGR 1.7.3
GEOS Version 3.2.2
PostgreSQL Client Version 9.1.4
SpatiaLite Version 3.0.0-beta
QWT Version 5.2.2

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

Giovanni Manghi wrote:

The backtrace suggests that it might be a GDAL/OGR bug. Would you mind to try QGIS with a different version of GDAL? ... although some others running 1.9.0 seem not to be affected

Which GDAL 1.9 package were you using?

#22 Updated by Giovanni Manghi over 12 years ago

Which GDAL 1.9 package were you using?

from ubuntugis (for ubuntu 12.04 (precise)).

#23 Updated by Paolo Cavallini about 12 years ago

  • Target version set to Version 2.0.0

#24 Updated by Paolo Cavallini over 10 years ago

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

Seems ok now.

Also available in: Atom PDF