Opened 9 years ago

Closed 9 years ago

#6076 closed defect (fixed)

ogr_mitab.py failing sometimes in trunk_mingw_w64

Reported by: Kurt Schwehr Owned by: Kurt Schwehr
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by Kurt Schwehr)

e.g.

Is this something I did or a flake?

  • r29698 tried to fix the flake (did not work) and improve error reporting (worked)
  • I make a bunch of other changes to autotest/ogr for cleanup, but I don't see anything that is a likely trigger

Ubuntu 14.04 local test:

./ogr_mitab.py 
  TEST: ogr_mitab_1 ... success
  TEST: ogr_mitab_2 ... success
  TEST: ogr_mitab_3 ... success
  TEST: ogr_mitab_4 ... success
  TEST: ogr_mitab_5 ... success
  TEST: ogr_mitab_6 ... success
  TEST: ogr_mitab_7 ... success
  TEST: ogr_mitab_8 ... success
  TEST: ogr_mitab_9 ... success
  TEST: ogr_mitab_10 ... success

[snip]

Test Script: ogr_mitab
Succeeded: 38
Failed:    0 (0 blew exceptions)
Skipped:   0
Expected fail:0
Duration:  2.80s

trunk_mingw_w64:

  TEST: ogr_sql_cleanup ... success
fixme:msvcrt:MSVCRT__sopen_s : pmode 0x81b6 ignored
Running tests from ogr/ogr_mitab.py
  TEST: ogr_mitab_1 ... success
  TEST: ogr_mitab_2 ... success
  TEST: ogr_mitab_3 ... ERROR 1: "EAS_ID" not recognised as an available field.
fail
    line 137: Geometry check fail.  i=0
  TEST: ogr_mitab_4 ... ERROR 1: SELECT from table tpoly failed, no such table/featureclass.
fail (blowup)
Traceback (most recent call last):
  File "pymod\gdaltest_python2.py", line 42, in run_func
    result = func()
  File ".\ogr_mitab.py", line 164, in ogr_mitab_4
    tr = ogrtest.check_features_against_list( sql_lyr, 'prfedea', [ '35043413' ] )
  File "../pymod\ogrtest.py", line 40, in check_features_against_list
    field_index = layer.GetLayerDefn().GetFieldIndex( field_name )
AttributeError: 'NoneType' object has no attribute 'GetLayerDefn'
  TEST: ogr_mitab_5 ... fail
    line 42: did not find required field eas_id
  TEST: ogr_mitab_6 ... fail (blowup)
Traceback (most recent call last):
  File "pymod\gdaltest_python2.py", line 42, in run_func
    result = func()
  File ".\ogr_mitab.py", line 210, in ogr_mitab_6
    datum_name = srs.GetAttrValue('PROJCS|GEOGCS|DATUM')
AttributeError: 'NoneType' object has no attribute 'GetAttrValue'
  TEST: ogr_mitab_7 ... success
  TEST: ogr_mitab_8 ... success
  TEST: ogr_mitab_9 ... ERROR 1: "eas_id" not recognised as an available field.
fail
    line 89: geometry names do not match.  "POINT" ! = "POLYGON"
  TEST: ogr_mitab_10 ... success
  TEST: ogr_mitab_11 ... success
  TEST: ogr_mitab_12 ... success
  TEST: ogr_mitab_13 ... ERROR 1: Unable to create Xerces C++ or Expat based GML reader, Xerces or Expat support
not configured into GDAL/OGR.
ERROR 1: File data/ionic_wfs.gml appears to be GML but the GML reader can't
be instantiated, likely because Xerces or Expat support wasn't
configured in.
skip
  TEST: ogr_mitab_14 ... ERROR 1: Unable to create Xerces C++ or Expat based GML reader, Xerces or Expat support
not configured into GDAL/OGR.
ERROR 1: File data/ionic_wfs.gml appears to be GML but the GML reader can't
be instantiated, likely because Xerces or Expat support wasn't
configured in.
skip
  TEST: ogr_mitab_15 ... success
  TEST: ogr_mitab_16 ... success
  TEST: ogr_mitab_17 ... ERROR 1: Unable to create Xerces C++ or Expat based GML reader, Xerces or Expat support
not configured into GDAL/OGR.
ERROR 1: File data/ionic_wfs.gml appears to be GML but the GML reader can't
be instantiated, likely because Xerces or Expat support wasn't
configured in.
skip
  TEST: ogr_mitab_18 ... success
  TEST: ogr_mitab_19 ... success
  TEST: ogr_mitab_20 ... success
  TEST: ogr_mitab_21 ... success
  TEST: ogr_mitab_22 ... success
  TEST: ogr_mitab_23 ... success
  TEST: ogr_mitab_24 ... success
  TEST: ogr_mitab_25 ... success
  TEST: ogr_mitab_26 ... success
  TEST: ogr_mitab_27 ... success
  TEST: ogr_mitab_28 ... success
  TEST: ogr_mitab_29 ... fixme:msvcrt:MSVCRT__sopen_s : pmode 0x81b6 ignored
fixme:msvcrt:MSVCRT__sopen_s : pmode 0x81b6 ignored
success
  TEST: ogr_mitab_30 ... success
  TEST: ogr_mitab_31 ... success
  TEST: ogr_mitab_32 ... success
  TEST: ogr_mitab_33 ... success
  TEST: ogr_mitab_34 ... success
  TEST: ogr_mitab_35 ... success
  TEST: ogr_mitab_36 ... success
  TEST: ogr_mitab_37 ... success
  TEST: ogr_mitab_cleanup ... success
fixme:msvcrt:MSVCRT__sopen_s : pmode 0x81b6 ignored
Running tests from ogr/ogr_fgdb.py
  TEST: ogr_fgdb_init ... skip

Change History (7)

comment:1 by Kurt Schwehr, 9 years ago

Description: modified (diff)
Status: newassigned

comment:2 by Kurt Schwehr, 9 years ago

Description: modified (diff)
Version: unspecifiedsvn-trunk

comment:4 by Kurt Schwehr, 9 years ago

Attempting to find the issue with r29712. Need to diff the tree between success and failure to see if that will id a test that is not cleaning up after itself and that oeder of run may sometimes be put before org_mitab.py.

comment:5 by Kurt Schwehr, 9 years ago

From EvenR:

EvenR: schwehr: I'd bet that tmp/test.shp would be the culprit (the shape file driver will open a directory with .shp in it). And this file seems to be only generated by ogr_vrt.py

: kml.kml and ogr_s57_9.000 should normally not be there, but I don't think they cause the error

schwehr: I guess a "vrt_ds = None" would be needed before ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') at line 1038 . Same at line 643

comment:6 by Kurt Schwehr, 9 years ago

r29726 hopefully fixes this by setting vrt_ds to None in ogr_vrt.py.

This also begs the question of should the tests have different names for their temp files. Should someone try to run these tests at the same time they definitely will have a race condition. And if one or the other tests starts to fail, it would be more obvious which test the files go with if they are named after the associated tests.

comment:7 by Kurt Schwehr, 9 years ago

Resolution: fixed
Status: assignedclosed

I am pretty sure it the flake is gone. Remove the debugging code with r29732

Note: See TracTickets for help on using tickets.