Bug report #10657

crash when opening a project with joined layers

Added by Salvatore Larosa over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Martin Dobias
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19056

Description

When opening a project with joined layers I get:

Program received signal SIGABRT, Aborted.
0x00007ffff0201475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff0201475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff02046f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00000000005791eb in qgisCrash (signal=-1) at /home/sam/pacchetti_gis/QGIS/src/app/main.cpp:303
#3  0x00000000005793c2 in myMessageOutput (type=QtFatalMsg, msg=
    0x8159c18 "ASSERT failure in QVector<T>::operator[]: \\"index out of range\\", file /usr/include/qt4/QtCore/qvector.h, line 355") at /home/sam/pacchetti_gis/QGIS/src/app/main.cpp:356
#4  0x00007ffff3181630 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffff3181a98 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffff3181c24 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00000000005e4df1 in QVector<QVariant>::operator[] (this=0x7fffffffaee8, i=-1) at /usr/include/qt4/QtCore/qvector.h:355
#8  0x00007ffff4a788d6 in QgsVectorLayerJoinBuffer::cacheJoinLayer (this=0x7542160, joinInfo=...)
    at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayerjoinbuffer.cpp:79
#9  0x00007ffff4a78d91 in QgsVectorLayerJoinBuffer::createJoinCaches (this=0x7542160)
    at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayerjoinbuffer.cpp:120
#10 0x00007ffff4a57ccc in QgsVectorLayer::createJoinCaches (this=0x753bcf0)
    at /home/sam/pacchetti_gis/QGIS/src/core/qgsvectorlayer.cpp:2759
#11 0x00007ffff49e5694 in QgsProject::_getMapLayers (this=0x14c30e0, doc=...)
    at /home/sam/pacchetti_gis/QGIS/src/core/qgsproject.cpp:739
#12 0x00007ffff49e6f2f in QgsProject::read (this=0x14c30e0) at /home/sam/pacchetti_gis/QGIS/src/core/qgsproject.cpp:923
#13 0x00007ffff49e619b in QgsProject::read (this=0x14c30e0, file=...) at /home/sam/pacchetti_gis/QGIS/src/core/qgsproject.cpp:809
#14 0x00000000005a0b05 in QgisApp::addProject (this=0x1235dd0, projectFile=...)
    at /home/sam/pacchetti_gis/QGIS/src/app/qgisapp.cpp:3727
#15 0x00000000005a323d in QgisApp::openProject (this=0x1235dd0, action=0x12a7ba0)

sample project attached.

join.zip (132 KB) Salvatore Larosa, 2014-06-20 02:21 AM

qgis-20140620-130237-7208-8412-7aa93c0.7z (4.42 MB) Jan Lippmann, 2014-06-20 04:11 AM

Associated revisions

Revision c1c8aa64
Added by Martin Dobias over 6 years ago

Fix #10657 (crash opening a project with invalid join)

History

#1 Updated by Salvatore Larosa over 6 years ago

  • Affected QGIS version changed from 2.2.0 to master

#2 Updated by Giovanni Manghi over 6 years ago

  • Target version set to Version 2.4
  • Category set to Vectors
  • Priority changed from High to Severe/Regression

and it wasn't crashing in previous qgis releases.

#3 Updated by Martin Dobias over 6 years ago

  • Assignee set to Martin Dobias

#4 Updated by Martin Dobias over 6 years ago

It crashes also with 2.2 for me

#5 Updated by Giovanni Manghi over 6 years ago

you have to go further back, 1.8.

#6 Updated by Martin Dobias over 6 years ago

  • Status changed from Open to Closed

#7 Updated by Jan Lippmann over 6 years ago

win 7 64bit and qgis 2.2 32bit the project with joind layers works fine.

with the master 32 bit qgis crash too (see dumpfile).

QGIS-Version 2.3.0-Master QGIS-Codeversion 7aa93c0
Kompiliert gegen Qt 4.7.1 Laufendes Qt 4.7.1
Kompiliert mit GDAL/OGR 1.11.0 Läuft mit GDAL/OGR 1.11.0
Kompiliert mit GEOS 3.4.2-CAPI-1.8.2 Läuft mit GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL-Client-Version 8.3.10 SpatiaLite-Version 4.1.1
QWT-Version 5.2.1 PROJ.4-Version 480
QScintilla2-Version 2.6.2 Diese QGIS-Kopie schreibt Debugausgaben.

#8 Updated by Salvatore Larosa over 6 years ago

Hi Martin thanks for the quick fix.

I now get a bunch of this messages opening the attribute table (c020102 in sample project):

src/providers/ogr/qgsogrprovider.cpp: 2534: (setSubsetString) SQL: SELECT * FROM "istat_indirizzi" WHERE "istat_indirizzi_edifici_id_indiriz"=1299815
src/core/qgsmessagelog.cpp: 45: (logMessage) 2014-06-20T16:01:58 OGR[1] OGR[2] error 6: Conversion failed when converting the string value 'istat_indirizzi_edifici_id_indiriz' to data type float.
src/core/qgsmessagelog.cpp: 45: (logMessage) 2014-06-20T16:01:59 OGR[1] OGR[3] error 1: Type mismatch or improper type of arguments to = operator.

Also available in: Atom PDF