Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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 6 years ago.
data package

Download all attachments as: .zip

Change History (8)

by lennertdefeyter, 6 years ago

Attachment: DataPackage.zip added

data package

comment:1 by lennertdefeyter, 6 years ago

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 6 years ago by lennertdefeyter (previous) (diff)

comment:2 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 40964:

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

comment:3 by Even Rouault, 6 years ago

In 40965:

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

comment:4 by Even Rouault, 6 years ago

In 40966:

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

comment:5 by Even Rouault, 6 years ago

Milestone: 2.2.4

comment:6 by lennertdefeyter, 6 years ago

Thank you for the quick fix. Looking forward to 2.2.4

comment:7 by Even Rouault, 6 years ago

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

Note: See TracTickets for help on using tickets.