Bug report #16039

QGIS crash when loading Geomedia mdb, ogr2ogr works fine

Added by amedeo fadini over 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Data Provider/OGR
Affected QGIS version:master Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:Yes Copied to github as #:23954

Description

I have compiled GDAL 2.1.2 following the instructions in
[[http://www.gdal.org/drv_mdb.html]] to read hexagon/intergraph Geomedia .mdb layers. It works fine with ogrinfo and ogr2ogr.

Trying to open the attached file (three layers, one with one polygon) in qgis loads the sublayers and crash when update canvas. the stdout says:

QGIS died on signal 11[New LWP 30883]

(full text attached)

Runing qgis in gdb freezes before listing sublayers.

here are gdb output.
-----
src/providers/ogr/qgsogrprovider.cpp: 3439: (open) [0ms] mFilePath: /home/amefad/abacospa/cona/2013_SIT_Banche dati Geomedia/PAT_QuadroA.mdb
src/providers/ogr/qgsogrprovider.cpp: 3440: (open) [0ms] mLayerIndex: 0
src/providers/ogr/qgsogrprovider.cpp: 3441: (open) [0ms] mLayerName:
src/providers/ogr/qgsogrprovider.cpp: 3442: (open) [0ms] mSubsetString:
ERROR 1: PGeo: MDB Tools driver not found!

Warning 1: Unable to install MDB driver for ODBC, MDB access may not supported.

ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver (.mdb, *.accdb);DBQ=/home/amefad/abacospa/cona/2013_SIT_Banche dati Geomedia/PAT_QuadroA.mdb,
[unixODBC][Driver Manager]Can't open lib 'Microsoft Access Driver (
.mdb, *.accdb)' : file not found
src/providers/ogr/qgsogrprovider.cpp: 3486: (open) [8ms] OGR failed to opened in update mode, trying in read-only mode

Thread 1 "qgis.bin" received signal SIGSEGV, Segmentation fault.
0x00007fff050002b4 in ?? ()

here's the output of ogrinfo:
-----
$ ogrinfo PAT_QuadroA.mdb
ERROR 1: PGeo: MDB Tools driver not found!

Warning 1: Unable to install MDB driver for ODBC, MDB access may not supported.

ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver (.mdb, *.accdb);DBQ=PAT_QuadroA.mdb,
[unixODBC][Driver Manager]Can't open lib 'Microsoft Access Driver (
.mdb, *.accdb)' : file not found
Had to open data source read-only.
INFO: Open of `PAT_QuadroA.mdb'
using driver `MDB' successful.
1: a0102011_ConfiniComunali
2: a0102012_ConfiniComunaliL
3: a0102021_ConfinePATI

PAT_QuadroA.mdb - sample data (484 KB) amedeo fadini, 2017-01-05 05:03 AM

qgis_stdout.txt Magnifier (22.2 KB) amedeo fadini, 2017-01-05 05:03 AM

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Feedback
  • Crashes QGIS or corrupts data changed from No to Yes

have you really compiled QGIS against your compiled version of gdal/ogr?

#2 Updated by amedeo fadini over 7 years ago

Oops... Sorry..
I wasn't aware of the needs to recompile also QGIS and never compiled QGIS before (i use nightly repository). In fact it's logic. I'll give a try and update the issue·

#3 Updated by amedeo fadini over 7 years ago

I compiled QGIS on my system, the version of GDAL matches with the version I have installed.
The crash still happens, but is only after the layer is loaded, when update canvas: if I unflag "canvas update" it loads the layer, assign sr, open attribute table and even copy geometry to other layers. All is ok. When the geomedia layer is disabled map canvas update correctly, when I enable it chrashes.

#4 Updated by Giovanni Manghi about 7 years ago

  • Priority changed from Normal to High

#5 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Feedback to Open

#6 Updated by Giovanni Manghi about 7 years ago

  • Target version set to Version 3.0

#7 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#8 Updated by Even Rouault over 6 years ago

  • Resolution set to up/downstream
  • Description updated (diff)
  • Status changed from Open to Closed

GDAL issue fixed in GDAL trunk per https://trac.osgeo.org/gdal/changeset/40685 and GDAL 2.2 branch per https://trac.osgeo.org/gdal/changeset/40686

Also available in: Atom PDF