Opened 9 years ago

Closed 8 years ago

#5725 closed defect (fixed)

Segmentation fault: 11 when initializing sqlite database (with sqlite 3.8.7)

Reported by: sjchristi Owned by: warmerdam
Priority: normal Milestone: 1.11.2
Component: default Version: 1.11.1
Severity: blocker Keywords:
Cc:

Description

I'm trying to run ogr2ogr to convert an .osm.pbf into sqlite. Here is the command I'm running:

$ ogr2ogr -f SQLITE -dsco SPATIALITE=yes guatemala.sqlite guatemala-latest.osm.pbf
Segmentation fault: 11

Here is the version I'm using:

$ ogr2ogr --version
GDAL 1.11.1, released 2014/09/24

The program segfaults, and generates a crash report (below). I'm on Mac OSX Mavericks and have used homebrew to install GDAL. I've tried installing from source as well. I'm not sure what the issue is.

Process:         ogr2ogr [61262]
Path:            /usr/local/Cellar/gdal/1.11.1_1/bin/ogr2ogr
Identifier:      ogr2ogr
Version:         0
Code Type:       X86-64 (Native)
Parent Process:  bash [32167]
Responsible:     Terminal [410]
User ID:         502

Date/Time:       2014-11-04 09:33:02.838 -0400
OS Version:      Mac OS X 10.9.5 (13F34)
Report Version:  11
Anonymous UUID:  47702606-A29B-5925-6C3A-DF5F5EA5149F

Sleep/Wake UUID: 8FF42D0E-B98F-4A99-B971-87019CF7ED46

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000600

VM Regions Near 0x600:
--> 
    __TEXT                 00000001039b0000-00000001039c1000 [   68K] r-x/rwx SM=COW  /usr/local/Cellar/gdal/1.11.1_1/bin/ogr2ogr

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libgdal.1.dylib               	0x0000000103ddfa00 OGR2SQLITE_Register() + 19
1   libgdal.1.dylib               	0x0000000103dc6fcd OGRSQLiteDataSource::Create(char const*, char**) + 123
2   libgdal.1.dylib               	0x0000000103dcc78a OGRSQLiteDriver::CreateDataSource(char const*, char**) + 76
3   ogr2ogr                       	0x00000001039b85ba main + 8929
4   libdyld.dylib                 	0x00007fff8d62b5fd start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00007ff7e24b1b30  rcx: 0x0000000000000000  rdx: 0x0000000000000008
  rdi: 0x0000000103ddf91f  rsi: 0x0000000000000006  rbp: 0x00007fff5c24f110  rsp: 0x00007fff5c24f098
   r8: 0x000000000000000d   r9: 0x00007ff7e2400000  r10: 0x00000000f83272c7  r11: 0x000000000009f110
  r12: 0x00007ff7e24b1b30  r13: 0x0000000000000001  r14: 0x0000000000000006  r15: 0x0000000000000001
  rip: 0x0000000103ddfa00  rfl: 0x0000000000010206  cr2: 0x0000000000000600
  
Logical CPU:     6
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x1039b0000 -        0x1039c0ff7 +ogr2ogr (0) <14D2F2E6-5953-3665-952A-487C2EAA3A98> /usr/local/bin/ogr2ogr
       0x1039c8000 -        0x10403aff7 +libgdal.1.dylib (0) <030B3FCE-FD54-3B20-B89C-5684EA40650A> /usr/local/Cellar/gdal/1.11.1_1/lib/libgdal.1.dylib
       0x1042a6000 -        0x1042d5fff +libproj.0.dylib (0) <B215192C-D2A4-3F3B-8B69-14B62D0B22F2> /usr/local/lib/libproj.0.dylib
       0x1042e2000 -        0x1042e7fff +libjson-c.2.dylib (0) <AEA108E2-3127-3669-97D1-B6AF2BE844BA> /usr/local/lib/libjson-c.2.dylib
       0x1042ee000 -        0x1042f4fff +libfreexl.1.dylib (0) <6E020EBF-110A-39A9-B4AF-8545F1E80E66> /usr/local/lib/libfreexl.1.dylib
       0x1042fe000 -        0x104315fff +libgeos_c.1.dylib (0) <34D97F2F-CF9C-3A6A-BA83-E12684B6E47D> /usr/local/lib/libgeos_c.1.dylib
       0x10432c000 -        0x104331fff +libgif.4.dylib (0) <665AC2BB-466D-367D-90AA-10B8F43C75F4> /usr/local/lib/libgif.4.dylib
       0x104339000 -        0x104365ff7 +libjpeg.8.dylib (0) <ED8F5F52-AADA-37F6-B58D-5D001D6B0580> /usr/local/lib/libjpeg.8.dylib
       0x10436e000 -        0x104386fff +libgeotiff.2.dylib (0) <53AF7E1A-823C-3E7B-9C66-F827A5E44DEF> /usr/local/lib/libgeotiff.2.dylib
       0x10439a000 -        0x1043f1fff +libtiff.5.dylib (0) <9DD25BC6-F502-3AA7-8CAA-E8A4BEF03729> /usr/local/lib/libtiff.5.dylib
       0x1043ff000 -        0x104422fff +libpng16.16.dylib (0) <E3BAF7A9-781A-3AC3-9B2F-F329821AD8C3> /usr/local/lib/libpng16.16.dylib
       0x104432000 -        0x104863fe7 +libspatialite.7.dylib (0) <7F23988C-7E9E-3BC8-AA07-80FB60B1B820> /usr/local/lib/libspatialite.7.dylib
       0x104889000 -        0x104922ff7 +libsqlite3.0.dylib (0) <EC34F5D7-3D54-3C73-8CAC-083965D585C6> /usr/local/opt/sqlite/lib/libsqlite3.0.dylib
       0x104939000 -        0x104a2cff7 +libxml2.2.dylib (0) <82D1BA16-1737-3E8D-8059-42986FE26019> /usr/local/opt/libxml2/lib/libxml2.2.dylib
       0x104a63000 -        0x104b12ff7 +libgeos-3.4.2.dylib (0) <4824504F-51A0-3CFE-97A5-7331DF6EBC73> /usr/local/Cellar/geos/3.4.2/lib/libgeos-3.4.2.dylib
       0x104bb5000 -        0x104bf8fff +liblwgeom-2.1.1.dylib (0) <AE8FE67B-1ACE-302A-A3A6-1E27FE30983F> /usr/local/opt/liblwgeom/lib/liblwgeom-2.1.1.dylib
    0x7fff6e535000 -     0x7fff6e568817  dyld (239.4) <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld
    0x7fff80077000 -     0x7fff800eafff  com.apple.securityfoundation (6.0 - 55122.3) <0FDC8F53-104C-3938-A852-5B33C30BAAD5> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
    0x7fff800eb000 -     0x7fff8013dfff  libc++.1.dylib (120) <4F68DFC5-2077-39A8-A449-CAC5FDEE7BDE> /usr/lib/libc++.1.dylib
    0x7fff80151000 -     0x7fff8015affb  libsystem_notify.dylib (121.20.1) <9B34B4FE-F5AD-3F09-A5F0-46AFF3571323> /usr/lib/system/libsystem_notify.dylib
    0x7fff8015b000 -     0x7fff80225ff7  com.apple.LaunchServices (572.28 - 572.28) <FC72C089-A069-3374-B80A-E041AF149F24> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
    0x7fff802d5000 -     0x7fff80539ffd  com.apple.security (7.0 - 55471.14.18) <83A9E8C8-06A1-3F6D-8514-C35CD0DBD370> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff805a6000 -     0x7fff80601ffb  com.apple.AE (665.5 - 665.5) <BBA230F9-144C-3CAB-A77A-0621719244CD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
    0x7fff8066e000 -     0x7fff80685ff7  com.apple.CFOpenDirectory (10.9 - 173.90.1) <7BC0194E-1B40-3FCA-ACD2-235CE5D65DFA> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
    0x7fff80761000 -     0x7fff80762ff7  libDiagnosticMessagesClient.dylib (100) <4CDB0F7B-C0AF-3424-BC39-495696F0DB1E> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff8097c000 -     0x7fff80b61fff  com.apple.CoreFoundation (6.9 - 855.17) <729BD6DA-1F63-3E72-A148-26F21EBF52BB> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff80bb1000 -     0x7fff80bbeff0  libbz2.1.0.dylib (29) <0B98AC35-B138-349C-8063-2B987A75D24C> /usr/lib/libbz2.1.0.dylib
    0x7fff80bc4000 -     0x7fff80bcdffd  com.apple.CommonAuth (4.0 - 2.0) <32BA436F-6319-3A0B-B5D2-2EB75FF36B5B> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x7fff80bf8000 -     0x7fff80c13ff7  libsystem_malloc.dylib (23.10.1) <A695B4E4-38E9-332E-A772-29D31E3F1385> /usr/lib/system/libsystem_malloc.dylib
    0x7fff80c71000 -     0x7fff80ca6ffc  com.apple.LDAPFramework (2.4.28 - 194.5) <4ADD0595-25B9-3F09-897E-3FB790AD2C5A> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
    0x7fff80ca7000 -     0x7fff80cabff7  libsystem_stats.dylib (93.90.3) <337946FC-B2E1-3DFA-A8B5-30DA8D584D75> /usr/lib/system/libsystem_stats.dylib
    0x7fff81b7a000 -     0x7fff81be7fff  com.apple.SearchKit (1.4.0 - 1.4.0) <B9B8D510-A27E-36B0-93E9-17146D9E9045> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
    0x7fff81c29000 -     0x7fff81c31fff  libsystem_dnssd.dylib (522.92.1) <17B03FFD-92C5-3282-9981-EBB28B456207> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff81c32000 -     0x7fff81c39ff8  liblaunch.dylib (842.92.1) <A40A0C7B-3216-39B4-8AE0-B5D3BAF1DA8A> /usr/lib/system/liblaunch.dylib
    0x7fff81c43000 -     0x7fff81c44fff  libunc.dylib (28) <62682455-1862-36FE-8A04-7A6B91256438> /usr/lib/system/libunc.dylib
    0x7fff822d4000 -     0x7fff822fdff7  libc++abi.dylib (49.1) <21A807D3-6732-3455-B77F-743E9F916DF0> /usr/lib/libc++abi.dylib
    0x7fff822fe000 -     0x7fff824b6ffb  libicucore.A.dylib (511.35) <6F097DA7-147C-32A1-93D2-728A64CF0DC2> /usr/lib/libicucore.A.dylib
    0x7fff824b9000 -     0x7fff824bbff7  libquarantine.dylib (71) <7A1A2BCB-C03D-3A25-BFA4-3E569B2D2C38> /usr/lib/system/libquarantine.dylib
    0x7fff82c56000 -     0x7fff82c7ffff  com.apple.DictionaryServices (1.2 - 208) <A539A058-BA57-35EE-AA08-D0B0E835127D> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
    0x7fff82f85000 -     0x7fff82f96ff7  libsystem_asl.dylib (217.1.4) <655FB343-52CF-3E2F-B14D-BEBF5AAEF94D> /usr/lib/system/libsystem_asl.dylib
    0x7fff82f97000 -     0x7fff82fa7fff  libbsm.0.dylib (33) <2CAC00A2-1352-302A-88FA-C567D4D69179> /usr/lib/libbsm.0.dylib
    0x7fff82fcb000 -     0x7fff82ffaff9  com.apple.GSS (4.0 - 2.0) <44E914BE-B0D0-3E05-9451-CA9E539AFA52> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x7fff82ffb000 -     0x7fff83067fff  com.apple.framework.IOKit (2.0.1 - 907.100.13) <057FDBA3-56D6-3903-8C0B-849214BF1985> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x7fff83070000 -     0x7fff83071fff  com.apple.TrustEvaluationAgent (2.0 - 25) <334A82F4-4AE4-3719-A511-86D0B0723E2B> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
    0x7fff830d6000 -     0x7fff830f1ff7  libCRFSuite.dylib (34) <FFAE75FA-C54E-398B-AA97-18164CD9789D> /usr/lib/libCRFSuite.dylib
    0x7fff8337e000 -     0x7fff8337effd  libOpenScriptingUtil.dylib (157) <19F0E769-0989-3062-9AFB-8976E90E9759> /usr/lib/libOpenScriptingUtil.dylib
    0x7fff833c8000 -     0x7fff83575f27  libobjc.A.dylib (551.1) <AD7FD984-271E-30F4-A361-6B20319EC73B> /usr/lib/libobjc.A.dylib
    0x7fff83851000 -     0x7fff8386dff7  libsystem_kernel.dylib (2422.115.4) <9EDE872E-2A9E-3A78-8E1D-AB790794A098> /usr/lib/system/libsystem_kernel.dylib
    0x7fff83d18000 -     0x7fff83d1eff7  libsystem_platform.dylib (24.90.1) <3C3D3DA8-32B9-3243-98EC-D89B9A1670B3> /usr/lib/system/libsystem_platform.dylib
    0x7fff8407e000 -     0x7fff840e3ffb  com.apple.Heimdal (4.0 - 2.0) <F34D6627-9F80-3823-8B57-DB629307DF87> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x7fff840e4000 -     0x7fff840fdff7  com.apple.Kerberos (3.0 - 1) <F108AFEB-198A-3BAF-BCA5-9DFCE55EFF92> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x7fff840fe000 -     0x7fff840fffff  liblangid.dylib (117) <9546E641-F730-3AB0-B3CD-E0E2FDD173D9> /usr/lib/liblangid.dylib
    0x7fff8439a000 -     0x7fff8439fff7  libunwind.dylib (35.3) <78DCC358-2FC1-302E-B395-0155B47CB547> /usr/lib/system/libunwind.dylib
    0x7fff84a02000 -     0x7fff84a29ffb  libsystem_info.dylib (449.1.3) <7D41A156-D285-3849-A2C3-C04ADE797D98> /usr/lib/system/libsystem_info.dylib
    0x7fff84af9000 -     0x7fff84b09ffb  libsasl2.2.dylib (170) <C8E25710-68B6-368A-BF3E-48EC7273177B> /usr/lib/libsasl2.2.dylib
    0x7fff85118000 -     0x7fff8514cfff  libssl.0.9.8.dylib (52) <51C844FF-D7CD-3525-9ABB-84B8DD11D5E4> /usr/lib/libssl.0.9.8.dylib
    0x7fff853f6000 -     0x7fff8541dff7  libsystem_network.dylib (241.3) <8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364> /usr/lib/system/libsystem_network.dylib
    0x7fff8593e000 -     0x7fff85ad9ff8  com.apple.CFNetwork (673.3 - 673.3) <4375B7CB-34B6-3A26-99AC-2D2404AD9C9B> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7fff86e34000 -     0x7fff86e34fff  com.apple.CoreServices (59 - 59) <7A697B5E-F179-30DF-93F2-8B503CEEEFD5> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x7fff87211000 -     0x7fff87215ff7  libcache.dylib (62) <BDC1E65B-72A1-3DA3-A57C-B23159CAAD0B> /usr/lib/system/libcache.dylib
    0x7fff877f1000 -     0x7fff877f4fff  com.apple.TCC (1.0 - 1) <32A075D9-47FD-3E71-95BC-BFB0D583F41C> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
    0x7fff87928000 -     0x7fff87934ff7  com.apple.OpenDirectory (10.9 - 173.90.1) <F08601E8-F7E8-3222-AD05-6A26003779CF> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
    0x7fff87935000 -     0x7fff87935ff7  libkeymgr.dylib (28) <3AA8D85D-CF00-3BD3-A5A0-E28E1A32A6D8> /usr/lib/system/libkeymgr.dylib
    0x7fff879d3000 -     0x7fff879d4ff7  libsystem_blocks.dylib (63) <FB856CD1-2AEA-3907-8E9B-1E54B6827F82> /usr/lib/system/libsystem_blocks.dylib
    0x7fff879d5000 -     0x7fff879effff  libdispatch.dylib (339.92.1) <C4E4A18D-3C3B-3C9C-8709-A4270D998DE7> /usr/lib/system/libdispatch.dylib
    0x7fff87b58000 -     0x7fff87c3fff7  libxml2.2.dylib (26) <A1DADD11-89E5-3DE4-8802-07186225967F> /usr/lib/libxml2.2.dylib
    0x7fff87cde000 -     0x7fff87ce9ff7  com.apple.NetAuth (5.0 - 5.0) <C811E662-9EC3-3B74-808A-A75D624F326B> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x7fff87f0b000 -     0x7fff87f33ffb  libxslt.1.dylib (13) <C9794936-633C-3F0C-9E71-30190B9B41C1> /usr/lib/libxslt.1.dylib
    0x7fff87f3b000 -     0x7fff87f6afd2  libsystem_m.dylib (3047.16) <B7F0E2E4-2777-33FC-A787-D6430B630D54> /usr/lib/system/libsystem_m.dylib
    0x7fff87f6c000 -     0x7fff87fb1fff  libcurl.4.dylib (78.94.1) <88F27F9B-052E-3375-938D-2603E90D8AD5> /usr/lib/libcurl.4.dylib
    0x7fff88218000 -     0x7fff88225ff7  libxar.1.dylib (202) <5572AA71-E98D-3FE1-9402-BB4A84E0E71E> /usr/lib/libxar.1.dylib
    0x7fff88229000 -     0x7fff8824dfff  libxpc.dylib (300.90.2) <AB40CD57-F454-3FD4-B415-63B3C0D5C624> /usr/lib/system/libxpc.dylib
    0x7fff88251000 -     0x7fff8826dfff  libresolv.9.dylib (54) <11C2C826-F1C6-39C6-B4E8-6E0C41D4FA95> /usr/lib/libresolv.9.dylib
    0x7fff88320000 -     0x7fff88620ff7  com.apple.Foundation (6.9 - 1056.16) <24349208-3603-3F5D-95CC-B379616FBEF8> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff88d7c000 -     0x7fff88d83ffb  libcopyfile.dylib (103.92.1) <CF29DFF6-0589-3590-834C-82E2316612E8> /usr/lib/system/libcopyfile.dylib
    0x7fff88d84000 -     0x7fff88e60fff  libcrypto.0.9.8.dylib (52) <ED7F3865-10D4-346B-8C9C-D968EB3B5D35> /usr/lib/libcrypto.0.9.8.dylib
    0x7fff88e61000 -     0x7fff88eaffff  libcorecrypto.dylib (161.1) <F3973C28-14B6-3006-BB2B-00DD7F09ABC7> /usr/lib/system/libcorecrypto.dylib
    0x7fff89149000 -     0x7fff8914efff  com.apple.DiskArbitration (2.6 - 2.6) <A4165553-770E-3D27-B217-01FC1F852B87> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x7fff8973d000 -     0x7fff89747ff7  com.apple.bsd.ServiceManagement (2.0 - 2.0) <2D27B498-BB9C-3D88-B05A-76908A8A26F3> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
    0x7fff89ab2000 -     0x7fff89ab9fff  com.apple.NetFS (6.0 - 4.0) <8E26C099-CE9D-3819-91A2-64EA929C6137> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x7fff8a2a5000 -     0x7fff8a32eff7  libsystem_c.dylib (997.90.3) <6FD3A400-4BB2-3B95-B90C-BE6E9D0D78FA> /usr/lib/system/libsystem_c.dylib
    0x7fff8a32f000 -     0x7fff8a33afff  libkxld.dylib (2422.115.4) <3C678B75-F7C5-3DBB-8DBD-48483AD54D5C> /usr/lib/system/libkxld.dylib
    0x7fff8a399000 -     0x7fff8a3b1fff  libexpat.1.dylib (12) <97F4A9A7-CB3E-3BBF-9314-4997FC770E52> /usr/lib/libexpat.1.dylib
    0x7fff8a801000 -     0x7fff8a802ffb  libremovefile.dylib (33) <3543F917-928E-3DB2-A2F4-7AB73B4970EF> /usr/lib/system/libremovefile.dylib
    0x7fff8a803000 -     0x7fff8a808fff  libmacho.dylib (845) <1D2910DF-C036-3A82-A3FD-44FF73B5FF9B> /usr/lib/system/libmacho.dylib
    0x7fff8b14b000 -     0x7fff8b14dff3  libsystem_configuration.dylib (596.15) <4998CB6A-9D54-390A-9F57-5D1AC53C135C> /usr/lib/system/libsystem_configuration.dylib
    0x7fff8b14e000 -     0x7fff8b14ffff  libsystem_sandbox.dylib (278.11.1) <0D0B13EA-6B7A-3AC8-BE60-B548543BEB77> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff8b150000 -     0x7fff8b1e0ff7  com.apple.Metadata (10.7.0 - 800.28) <CB43AF4C-F5DE-3161-B7D7-540DF9718EAD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
    0x7fff8b2a4000 -     0x7fff8b2abff7  libsystem_pthread.dylib (53.1.4) <AB498556-B555-310E-9041-F67EC9E00E2C> /usr/lib/system/libsystem_pthread.dylib
    0x7fff8b2ac000 -     0x7fff8b2eeff7  libauto.dylib (185.5) <F45C36E8-B606-3886-B5B1-B6745E757CA8> /usr/lib/libauto.dylib
    0x7fff8be66000 -     0x7fff8c150fff  com.apple.CoreServices.CarbonCore (1077.17 - 1077.17) <3A2E92FD-DEE2-3D45-9619-11500801A61C> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
    0x7fff8c15f000 -     0x7fff8c163ff7  libheimdal-asn1.dylib (323.92.1) <CAE21FFF-5763-399C-B7C5-EEBFFEEF2242> /usr/lib/libheimdal-asn1.dylib
    0x7fff8c1bc000 -     0x7fff8c2a6fff  libsqlite3.dylib (158) <00269BF9-43BE-39E0-9C85-24585B9923C8> /usr/lib/libsqlite3.dylib
    0x7fff8c615000 -     0x7fff8c68cfff  com.apple.CoreServices.OSServices (600.4 - 600.4) <B9436B61-0885-3EF6-B981-EB77C325F745> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
    0x7fff8c68d000 -     0x7fff8c697fff  libcommonCrypto.dylib (60049) <8C4F0CA0-389C-3EDC-B155-E62DD2187E1D> /usr/lib/system/libcommonCrypto.dylib
    0x7fff8cab9000 -     0x7fff8cacaff7  libz.1.dylib (53) <42E0C8C6-CA38-3CA4-8619-D24ED5DD492E> /usr/lib/libz.1.dylib
    0x7fff8cb24000 -     0x7fff8cb2bfff  libcompiler_rt.dylib (35) <4CD916B2-1B17-362A-B403-EF24A1DAC141> /usr/lib/system/libcompiler_rt.dylib
    0x7fff8cb82000 -     0x7fff8cb86fff  libpam.2.dylib (20) <B93CE8F5-DAA8-30A1-B1F6-F890509513CB> /usr/lib/libpam.2.dylib
    0x7fff8ce38000 -     0x7fff8cf29ff9  libiconv.2.dylib (41) <BB44B115-AC32-3877-A0ED-AEC6232A4563> /usr/lib/libiconv.2.dylib
    0x7fff8d1cc000 -     0x7fff8d1cdff7  libSystem.B.dylib (1197.1.1) <E6BCC031-4342-318C-A1AD-A8E9AEAE716F> /usr/lib/libSystem.B.dylib
    0x7fff8d5c4000 -     0x7fff8d627ffb  com.apple.SystemConfiguration (1.13.1 - 1.13.1) <2C8E1A73-5AD6-3A7D-8ED8-D6755555A993> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff8d628000 -     0x7fff8d62bff7  libdyld.dylib (239.4) <A1273A02-4928-3BAC-A846-6C069DC1A0A6> /usr/lib/system/libdyld.dylib
    0x7fff8d637000 -     0x7fff8d69bfff  com.apple.datadetectorscore (5.0 - 354.5) <0AE9749A-6BFC-3032-B802-210DF59AEDB0> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 205568
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=112.6M resident=90.0M(80%) swapped_out_or_unallocated=22.6M(20%)
Writable regions: Total=177.2M written=119.1M(67%) resident=119.2M(67%) swapped_out=0K(0%) unallocated=58.0M(33%)
 
REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                            120.2M
MALLOC (admin)                       16K
MALLOC_LARGE (reserved)            47.8M        reserved VM address space (unallocated)
STACK GUARD                        56.0M
Stack                              8192K
VM_ALLOCATE                           8K
__DATA                             4432K
__LINKEDIT                         69.0M
__TEXT                             43.6M
__UNICODE                           544K
shared memory                         4K
===========                      =======
TOTAL                             349.5M
TOTAL, minus reserved VM space    301.7M

Change History (22)

comment:1 by Even Rouault, 9 years ago

That could be linked to a sqlite version compiled without extension support, although it is unfortunate that we crash in such circumstance.

Perhaps you can try setting OGR_SQLITE_STATIC_VIRTUAL_OGR to NO as an environment variable. Not sure if that will help.

in reply to:  1 ; comment:2 by sjchristi, 9 years ago

Replying to rouault:

That could be linked to a sqlite version compiled without extension support, although it is unfortunate that we crash in such circumstance.

Perhaps you can try setting OGR_SQLITE_STATIC_VIRTUAL_OGR to NO as an environment variable. Not sure if that will help.

I gave OGR_SQLITE_STATIC_VIRTUAL_OGR a shot; it didn't help (exact same crash).

Is there a way I can determine if my sqlite was compiled without extension support? I'm just using the bottled homebrew sqlite installation, so I imagine lots of folks get this..

$ brew info sqlite3
sqlite: stable 3.8.7.1 (bottled)

I am happy to try manually building sqlite3 with extension support. I'm looking for info on this now (although, if you know, it would be great if you could explain how).

in reply to:  2 comment:3 by sjchristi, 9 years ago

One more note: I cracked open my sqlite3 lib (reported in the stack trace) and it appears that extension support is compiled into this library.. At least, according to this webpage:

http://www.sqlite.org/compile.html

"SQLITE_OMIT_LOAD_EXTENSION

This option omits the entire extension loading mechanism from SQLite, including sqlite3_enable_load_extension() and sqlite3_load_extension() interfaces."

-- I checked and both sqlite3_enable_load_extension and sqlite3_load_extension are defined in the dylib.

Is there anything else I could do to debug this?

thanks for the help.

comment:4 by Even Rouault, 9 years ago

You could compile GDAL with --enable-debug and run your command under a debugger to display a precise stack trace with the line numbers.

comment:5 by Even Rouault, 9 years ago

MacOSX GDAL isn't completely broken since we have a Travis-CI instance that passes the OGR SQlite tests successfully : https://s3.amazonaws.com/archive.travis-ci.org/jobs/39722316/log.txt That instance has no spatialite support however.

comment:6 by akks, 9 years ago

I can confirm this bug under two different environments on Windows: MSVC and MINGW / MSYS2. (my build scripts are here: https://github.com/alex85k/winbuilds , build_all_base and build_all_gdal downloads and installs all libraries). There is also segmentation fault without SPATIALITE=YES.

When I compile with sqlite 3.8.6 (recompiling spatialite and gdal 1.11.1), there are no problems, but with sqlite 3.8.7 there are faults in the following line: {{{c++

sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register);

}}} (invalid memory access)

comment:7 by Even Rouault, 9 years ago

Hum, on Linux, works fine with sqlite 3.8.7

in reply to:  7 comment:8 by akks, 9 years ago

Replying to rouault:

Hum, on Linux, works fine with sqlite 3.8.7

Just built without spatialite - the error is the same... (sqlite3_auto_extension) In sqlite 3 code there are strange "new in sqlite 3.8.7" comments: https://github.com/alex85k/sqlite3-cmake/commit/95fedcca22604f6eab61538e16e374bb99499404

comment:9 by akks, 9 years ago

to be correct, there are /* Version 3.8.7 and later */ comments...

comment:10 by akks, 9 years ago

There is a define

#define sqlite3_auto_extension         sqlite3_api->auto_extension

in sqlite3ext.h and the debugger says that sqlite3_api = 0: https://www.dropbox.com/s/50223ye7h3ecbrd/2014-11-10%2021_55_43-ogr2ogr%20%28Debugging%29%20-%20Microsoft%20Visual%20Studio.png?dl=0

comment:11 by akks, 9 years ago

And SQLITE_EXTENSION_INIT2 was not called to assign sqlite3_api (the breakpoint there was not triggered)...

comment:12 by akks, 9 years ago

So it seems the problem is that "sqlite3_auto_extension" is not available now until sqlite3_extensio_init or OGR2SQLITE_static_register... Do not know how to fix.

comment:13 by akks, 9 years ago

I have found a solution that fixed the segfault, here is the patch (can not add an attachment): https://dl.dropboxusercontent.com/u/63393258/sqlite-3.8.7.patch

Do not know, maybe it is an SQlite bug or some outdated code in ogrsqlitevirtualogr.cpp . Could someone please have a look?

comment:14 by Even Rouault, 9 years ago

Milestone: 1.11.2
Resolution: fixed
Status: newclosed
Summary: Segmentation fault: 11 when initializing sqlite databaseSegmentation fault: 11 when initializing sqlite database (with sqlite 3.8.7)

I've fixed a bit differently. No, it's not a SQLite bug. It's just that their extension interface has evolved and now includes a "virtual" function that was always static before. When I tested before, I just linked against new sqlite with the same GDAL binary compiled with older interfaces, which hides the issue.

trunk r27949, branches/1.11 r27950 "SQLite: fix segmentation fault when executing OGR2SQLITE_Register() when compiling against sqlite 3.8.7 (#5725)"

comment:15 by akks, 9 years ago

Thank you! (will add the patch to the related gdal 1.11.1 packages in MSYS2 and my build_gdal.bat until 1.11.2 is released)

comment:16 by beamerblvd, 8 years ago

Resolution: fixed
Status: closedreopened

I was also getting this error every time in 1.11.1 in OS X 10.9.5. I updated to 1.11.3 and now the error alternates. Sometimes I get:

libc++abi.dylib: Pure virtual function called!
Abort trap: 6

Sometimes I get:

Segmentation fault: 11

I get this with the Python-GDAL bindings when loading the tz_world shapefile (downloadable from http://efele.net/maps/tz/world/) and trying to set a spatial filter on it. The code executes fine up until the call to SetSpatialFilter(); once that method is called, I get one of the two errors above each time I call it. Seems to be random which error I get.

from osgeo import ogr
from osgeo import gdalconst

    driver = ogr.GetDriverByName('ESRI Shapefile')
    shapefile = driver.Open('/path/to/file', gdalconst.GA_ReadOnly)
    self.layer = shapefile.GetLayer()
    point = ogr.Geometry(ogr.wkbPoint)
    point.AddPoint(-122.4053007, 37.7823285)
    self.layer.SetSpatialFilter(point)
Last edited 8 years ago by beamerblvd (previous) (diff)

comment:17 by Even Rouault, 8 years ago

beamerblvd, could you display the stack trace of the crash ?

comment:18 by beamerblvd, 8 years ago

There is no stacktrace, because it's a segmentation fault. When a segfault happens, the interpreter aborts and there is no stacktrace to view. I can get a core dump, but it's 500MB. Not sure how to even get that to you.

I found a better example of how to do what I want to do, but I'm still getting a segfault. In fact, just calling GetSpacialRef on the layer gets me a segfault (or a "Pure virtual function called" error sometimes):

from osgeo import ogr
from osgeo import gdalconst

    driver = ogr.GetDriverByName('ESRI Shapefile')
    shapefile = driver.Open('/path/to/file', gdalconst.GA_ReadOnly)
    self.layer = shapefile.GetLayer()
    self.spat_ref = self.layer.GetSpatialRef()

It gets up to the last line without a problem (and I can read the name and feature count of the layer, the field count and geometry type of the definition, and the name, type, and type name of the field without any errors), but as soon as GetSpatialRef is called, segfault.

All of this works:

    self.layer.GetName()
    self.layer.GetFeatureCount()
    definition = self.layer.GetLayerDefn()
    definition.GetFieldCount()
    definition.GetGeomType()
    field = definition.GetFieldDefn(0)
    field.GetName()
    field.GetType()
    field.GetTypeName()

This is also happening with GDAL 2.0.1 and GDAL from PyPi 2.0.1 on Ubuntu 12.0.4.

comment:19 by Even Rouault, 8 years ago

Your above scripts are not self contained, so I tried what is the closest, and it works fine :

from osgeo import ogr
from osgeo import gdalconst
driver = ogr.GetDriverByName('ESRI Shapefile')
shapefile = driver.Open('world/tz_world.shp', gdalconst.GA_ReadOnly)
layer = shapefile.GetLayer()
spat_ref = layer.GetSpatialRef()
print spat_ref

displays:

GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]
>>> 

(And for the record I doubt your issue has anything to do with the initial ticket, since the initial ticket was about a defect in the SQLite driver, and here we're talking about shapefiles, or perhaps something else.)

comment:20 by beamerblvd, 8 years ago

Here's some cursory information I was able to glean from the core dump using lldb. I'm not familiar with lldb, so if you have other lldb commands whose output you want to see, let me know.

(geo_service)nwilliams-04867:geo_service nwilliams$ lldb python --core=/Users/blah/docker-dev/volumes/geo-data/core.767 
(lldb) target create "python" --core "/Users/blag/docker-dev/volumes/geo-data/core.767"
warning: (x86_64) /Users/blah/docker-dev/volumes/geo-data/core.767 load command 267 LC_SEGMENT_64 has a fileoff + filesize (0x1e349000) that extends beyond the end of the file (0x1e348000), the segment will be truncated to match
warning: (x86_64) /Users/blah/docker-dev/volumes/geo-data/core.767 load command 268 LC_SEGMENT_64 has a fileoff (0x1e349000) that extends beyond the end of the file (0x1e348000), ignoring this section
Core file '/Users/blah/docker-dev/volumes/geo-data/core.767' (x86_64) was loaded.
Process 0 stopped
* thread #1: tid = 0x0000, 0x000000010aabb678 libgdal.1.dylib`OGR_L_GetSpatialRef + 14, stop reason = signal SIGSTOP
    frame #0: 0x000000010aabb678 libgdal.1.dylib`OGR_L_GetSpatialRef + 14
libgdal.1.dylib`OGR_L_GetSpatialRef + 14:
-> 0x10aabb678:  callq  *0x98(%rax)
   0x10aabb67e:  movq   %rax, %rbx
   0x10aabb681:  jmp    0x10aabb6ab               ; OGR_L_GetSpatialRef + 65
   0x10aabb683:  leaq   0x175941(%rip), %rdx      ; "Pointer '%s' is NULL in '%s'.\n"

(lldb) bt all
* thread #1: tid = 0x0000, 0x000000010aabb678 libgdal.1.dylib`OGR_L_GetSpatialRef + 14, stop reason = signal SIGSTOP
  * frame #0: 0x000000010aabb678 libgdal.1.dylib`OGR_L_GetSpatialRef + 14
    frame #1: 0x000000010ba5b76e _ogr.so`_wrap_Layer_GetSpatialRef(_object*, _object*) + 111
    frame #2: 0x0000000109ad212f Python`PyEval_EvalFrameEx + 16242
    frame #3: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #4: 0x0000000109ad48c8 Python`___lldb_unnamed_function1488$$Python + 284
    frame #5: 0x0000000109ad14d4 Python`PyEval_EvalFrameEx + 13079
    frame #6: 0x0000000109ad4864 Python`___lldb_unnamed_function1488$$Python + 184
    frame #7: 0x0000000109ad14d4 Python`PyEval_EvalFrameEx + 13079
    frame #8: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #9: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #10: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #11: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #12: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #13: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #14: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #15: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #16: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #17: 0x0000000109a9ccad Python`___lldb_unnamed_function1039$$Python + 61
    frame #18: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #19: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #20: 0x0000000109ad4864 Python`___lldb_unnamed_function1488$$Python + 184
    frame #21: 0x0000000109ad14d4 Python`PyEval_EvalFrameEx + 13079
    frame #22: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #23: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #24: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #25: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #26: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #27: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #28: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #29: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #30: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #31: 0x0000000109a9ccad Python`___lldb_unnamed_function1039$$Python + 61
    frame #32: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #33: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #34: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #35: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #36: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #37: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #38: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #39: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #40: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #41: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #42: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #43: 0x0000000109a9ccad Python`___lldb_unnamed_function1039$$Python + 61
    frame #44: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #45: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #46: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #47: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #48: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #49: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #50: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #51: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #52: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #53: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #54: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #55: 0x0000000109a9ccad Python`___lldb_unnamed_function1039$$Python + 61
    frame #56: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #57: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #58: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #59: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #60: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #61: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #62: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #63: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #64: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #65: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #66: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #67: 0x0000000109a9ccad Python`___lldb_unnamed_function1039$$Python + 61
    frame #68: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #69: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #70: 0x0000000109ad4864 Python`___lldb_unnamed_function1488$$Python + 184
    frame #71: 0x0000000109ad14d4 Python`PyEval_EvalFrameEx + 13079
    frame #72: 0x0000000109ad4864 Python`___lldb_unnamed_function1488$$Python + 184
    frame #73: 0x0000000109ad14d4 Python`PyEval_EvalFrameEx + 13079
    frame #74: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #75: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #76: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #77: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #78: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #79: 0x0000000109ad2395 Python`PyEval_EvalFrameEx + 16856
    frame #80: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #81: 0x0000000109a75796 Python`___lldb_unnamed_function512$$Python + 336
    frame #82: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #83: 0x0000000109a629a7 Python`___lldb_unnamed_function194$$Python + 174
    frame #84: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #85: 0x0000000109a9d6ce Python`___lldb_unnamed_function1062$$Python + 64
    frame #86: 0x0000000109a99184 Python`___lldb_unnamed_function1007$$Python + 189
    frame #87: 0x0000000109a57f72 Python`PyObject_Call + 101
    frame #88: 0x0000000109ad1df5 Python`PyEval_EvalFrameEx + 15416
    frame #89: 0x0000000109ace093 Python`PyEval_EvalCodeEx + 1641
    frame #90: 0x0000000109acda24 Python`PyEval_EvalCode + 54
    frame #91: 0x0000000109aecc2c Python`___lldb_unnamed_function1610$$Python + 53
    frame #92: 0x0000000109aeccd3 Python`PyRun_FileExFlags + 137
    frame #93: 0x0000000109aec821 Python`PyRun_SimpleFileExFlags + 718
    frame #94: 0x0000000109afd363 Python`Py_Main + 2995
    frame #95: 0x00007fff8d4825fd libdyld.dylib`start + 1
Last edited 8 years ago by beamerblvd (previous) (diff)

comment:21 by beamerblvd, 8 years ago

I figured out what the cause is. What I can't figure out is whether I'm "just doing it wrong" or there's a serious memory management problem with the library.

This segfaults:

class TestTimeZoneShapeFilePythonGDAL(TestCase):

    def setUp(self):
        driver = ogr.GetDriverByName('ESRI Shapefile')
        shapefile = driver.Open(
            '/path/to/file',
            gdalconst.GA_ReadOnly
        )
        self.assertIsNotNone(shapefile)
        self.assertEqual(1, shapefile.GetLayerCount())

        self.layer = shapefile.GetLayer()

    def test_single_coordinate_nashville(self):
        spat_ref = self.layer.GetSpatialRef()

This does not segfault and successfully loads the spacial ref:

class TestTimeZoneShapeFilePythonGDAL(TestCase):

    def setUp(self):
        driver = ogr.GetDriverByName('ESRI Shapefile')
        self.shapefile = driver.Open(
            '/path/to/file',
            gdalconst.GA_ReadOnly
        )
        self.assertIsNotNone(self.shapefile)
        self.assertEqual(1, self.shapefile.GetLayerCount())

        self.layer = self.shapefile.GetLayer()

    def test_single_coordinate_nashville(self):
        spat_ref = self.layer.GetSpatialRef()

The only difference is that, in the first (segfaulting) example, shapefile is a local variable, and in the second (working) example, self.shapefile is an instance variable.

So it appears that, when the shapefile local variable gets discarded at the end of the setUp method, it's putting the open shapefile in an inconsistent state, and it can't be used in other methods. I can understand why this might happen, but IMO, it should error cleanly, not crash the entire Python interpreter.

comment:22 by Even Rouault, 8 years ago

Resolution: fixed
Status: reopenedclosed

Ah ok, that's what I felt but it wasn't completely obvious from your initial description. Yes the memory management has some know issues, documented at https://trac.osgeo.org/gdal/wiki/PythonGotchas . Basically the python bindings are very close to the C++ code, and when some object get out of scope, then crashes might occur. I'll close this ticket as there's nothing really new for the project, but I understand your surprise.

Note: See TracTickets for help on using tickets.