[gdal-dev] EXC_BAD_ACCESS on 1.11 OGROpen() SQLite or GeoPackage

Nik Sands nik at nixanz.com
Fri Jan 20 16:27:49 PST 2017


Hi all,

Using GDAL 1.11, I’m getting a crash when attempting to OGROpen() with either the SQLite driver or the GeoPackage driver (which uses SQLite).  Stack trace is below.

My Googling for answers found no results for the specific search criteria I used.  ("gdal exc_bad_access ogropen sqlite3_auto_extension”)

I get an EXC_BAD_ACCESS at the only line in the OGR2SQLITE_Register() function in ogrsqliteviritualogr.cpp .  Ie at:

void OGR2SQLITE_Register()
{
    sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register);  //  EXC_BAD_ACCESS HERE
}

Has anybody come across something like this, or has any idea what I’m doing wrong here?  (Stack trace below).

(I’m stuck with GDAL 1.x until I can figure out how to build 2.x for iOS.)

Thanks,
Nik.


Stack trace (top few only) from debugger console:
——————————————————
(lldb) bt
* thread #1: tid = 0x3117268, 0x0000000102423403 GIST`OGR2SQLITE_Register() + 19 at ogrsqlitevirtualogr.cpp:2460, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x600)
  * frame #0: 0x0000000102423403 GIST`OGR2SQLITE_Register() + 19 at ogrsqlitevirtualogr.cpp:2460 [opt]
    frame #1: 0x000000010240a78c GIST`OGRSQLiteDataSource::OpenOrCreateDB(this=0x0000600000193db0, flags=2) + 28 at ogrsqlitedatasource.cpp:455 [opt]
    frame #2: 0x000000010240b498 GIST`OGRSQLiteDataSource::Open(this=0x0000600000193db0, pszNewName=<unavailable>, bUpdateIn=1) + 180 at ogrsqlitedatasource.cpp:993 [opt]
    frame #3: 0x000000010240fd96 GIST`OGRSQLiteDriver::Open(this=<unavailable>, pszFilename="/Users/nsands/Library/Developer/CoreSimulator/Devices/6D46D041-C9C3-498B-A918-85036F1A7EB0/data/Containers/Data/Application/18E913B4-E19B-4C62-8910-2ACB4136C361/Documents/Tracks", bUpdate=1) + 262 at ogrsqlitedriver.cpp:165 [opt]
    frame #4: 0x0000000102401e31 GIST`OGRSFDriverRegistrar::Open(pszName="/Users/nsands/Library/Developer/CoreSimulator/Devices/6D46D041-C9C3-498B-A918-85036F1A7EB0/data/Containers/Data/Application/18E913B4-E19B-4C62-8910-2ACB4136C361/Documents/Tracks", bUpdate=<unavailable>, ppoDriver=<unavailable>) + 227 at ogrsfdriverregistrar.cpp:226 [opt]
    frame #5: 0x0000000102401f80 GIST`::OGROpen(pszName=<unavailable>, bUpdate=<unavailable>, pahDriverList=<unavailable>) + 35 at ogrsfdriverregistrar.cpp:284 [opt]
    frame #6: 0x0000000101fdf9cd GIST`-[VectorDataSource initWithURL:](self=0x00006000000269c0, _cmd="initWithURL:", url=@"file:///Users/nsands/Library/Developer/CoreSimulator/Devices/6D46D041-C9C3-498B-A918-85036F1A7EB0/data/Containers/Data/Application/18E913B4-E19B-4C62-8910-2ACB4136C361/Documents/Tracks") + 189 at VectorDataSource.m:33

========================================================
NIK SANDS
Line Tamer | Time Traveller | Space Cadet



More information about the gdal-dev mailing list