Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#7171 closed defect (fixed)

GDAL Fails on reading certain tab files

Reported by: lennertdefeyter Owned by: warmerdam
Priority: normal Milestone: 2.2.4
Component: default Version: unspecified
Severity: normal Keywords: GDAL Windows
Cc:

Description

Hi,

Python gdal seems to hard crash on certain tab files. Python: 2.7 32 bit GDAL Version: 2.2.3 found at https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal OS: Windows 7

The output is: Process finished with exit code -1073741819 (0xC0000005)

The code is the following:

import ogr, os

path = r"g:\31\23922\Tech\SWMM\Heatherton\Data\Heatherton_NS_draped.TAB"
path = r"c:\temp\Heatherton_NS_draped.TAB"
def check_path(path):
    try:
        print(path)
        print os.path.exists(path)
        ds = ogr.Open(path)
        if ds is None:
            return None
        for i in range(ds.GetLayerCount()):
            print (ds.GetLayerByIndex(i).GetExtent())
    except:
        import traceback
        traceback.print_exc()


if __name__ == '__main__':
    check_path(path)
    print 'amIhere?'

It does print the extent but does not reach the amIhere. I have attached a layerpackage which crashes (the Heatherton_NS_draped file). Oddly enough it does not crash if the other layers are not in the same folder.

Attachments (1)

DataPackage.zip (25.8 KB) - added by lennertdefeyter 10 months ago.
data package

Download all attachments as: .zip

Change History (8)

Changed 10 months ago by lennertdefeyter

Attachment: DataPackage.zip added

data package

comment:1 Changed 10 months ago by lennertdefeyter

Confirmed also by regularly running ogrinfo on Heatherton_NS_draped.tab. Tested with gdal 2.2.3. The result is the standard windows screen "ogrinfo has stopped working"

Last edited 10 months ago by lennertdefeyter (previous) (diff)

comment:2 Changed 10 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 40964:

MITAB: fix crash on reading TAB views (fixes #7171)

comment:3 Changed 10 months ago by Even Rouault

In 40965:

MITAB: fix crash on reading TAB views (fixes #7171)

comment:4 Changed 10 months ago by Even Rouault

In 40966:

fuzzers: add a tab view file in seed corpus (refs #7171)

comment:5 Changed 10 months ago by Even Rouault

Milestone: 2.2.4

comment:6 Changed 10 months ago by lennertdefeyter

Thank you for the quick fix. Looking forward to 2.2.4

comment:7 Changed 10 months ago by Even Rouault

You can use nightly builds of gdal-dev on OSGeo4W or http://gisinternals.com/status.php

Note: See TracTickets for help on using tickets.