Skip to content

Regression in GDAL 3.2.2 🤔  #3656

@felixxm

Description

@felixxm

Expected behavior and actual behavior.

We noticed a regression in GDAL 3.2.2 when running Django's test suite. All tests work with many other combinations, so we assumed that there is some regression in GDAL 3.2.2:

  • GDAL 3.0.4 and GEOS 3.9.1 ✔️
  • GDAL 3.1.4 and GEOS 3.9.1 ✔️
  • GDAL 3.2.0 and GEOS 3.9.1 ✔️
  • GDAL 3.2.1 and GEOS 3.9.1 ✔️
  • GDAL 3.2.2 and GEOS 3.9.1 ❎
  • GDAL 3.1.4 and GEOS 3.8.1 ✔️
  • GDAL 3.2.0 and GEOS 3.8.1 ✔️
  • GDAL 3.2.1 and GEOS 3.8.1 ✔️
  • GDAL 3.2.2 and GEOS 3.8.1 ❎

Steps to reproduce the problem.

I'm really sorry that I cannot provide more details, except for the logs:

Details
======================================================================
ERROR: test_closepolygons (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing closing Polygon objects.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 258, in test_closepolygons
    self.assertEqual(OGRGeometry('POINT(2.5 2.5)'), poly.centroid)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 631, in centroid
    capi.get_centroid(self.ptr, p.ptr)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 117, in check_errcode
    check_err(result, cpl=cpl)
  File "/repo/django/django/contrib/gis/gdal/error.py", line 59, in check_err
    raise e(msg)
django.contrib.gis.gdal.error.GDALException: OGR failure.

======================================================================
ERROR: test_difference (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing difference().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 380, in test_difference
    d2 = a.difference(b)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 477, in difference
    return self._geomgen(capi.geom_diff, other)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 455, in _geomgen
    return OGRGeometry(gen_func(self.ptr, other.ptr), self.srs)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 83, in check_geom
    raise GDALException('Invalid geometry pointer returned from "%s".' % func.__name__)
django.contrib.gis.gdal.error.GDALException: Invalid geometry pointer returned from "OGR_G_Difference".

======================================================================
ERROR: test_intersection (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing intersects() and intersection().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 393, in test_intersection
    i2 = a.intersection(b)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 484, in intersection
    return self._geomgen(capi.geom_intersection, other)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 455, in _geomgen
    return OGRGeometry(gen_func(self.ptr, other.ptr), self.srs)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 83, in check_geom
    raise GDALException('Invalid geometry pointer returned from "%s".' % func.__name__)
django.contrib.gis.gdal.error.GDALException: Invalid geometry pointer returned from "OGR_G_Intersection".

======================================================================
ERROR: test_polygons (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing Polygon objects.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 223, in test_polygons
    x, y = poly.centroid.tuple
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 631, in centroid
    capi.get_centroid(self.ptr, p.ptr)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 117, in check_errcode
    check_err(result, cpl=cpl)
  File "/repo/django/django/contrib/gis/gdal/error.py", line 59, in check_err
    raise e(msg)
django.contrib.gis.gdal.error.GDALException: OGR failure.

======================================================================
ERROR: test_srs (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing OGR Geometries with Spatial Reference objects.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 300, in test_srs
    diff = a.difference(b)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 477, in difference
    return self._geomgen(capi.geom_diff, other)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 455, in _geomgen
    return OGRGeometry(gen_func(self.ptr, other.ptr), self.srs)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 83, in check_geom
    raise GDALException('Invalid geometry pointer returned from "%s".' % func.__name__)
django.contrib.gis.gdal.error.GDALException: Invalid geometry pointer returned from "OGR_G_Difference".

======================================================================
ERROR: test_symdifference (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing sym_difference().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 405, in test_symdifference
    d2 = a.sym_difference(b)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 491, in sym_difference
    return self._geomgen(capi.geom_sym_diff, other)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 455, in _geomgen
    return OGRGeometry(gen_func(self.ptr, other.ptr), self.srs)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 83, in check_geom
    raise GDALException('Invalid geometry pointer returned from "%s".' % func.__name__)
django.contrib.gis.gdal.error.GDALException: Invalid geometry pointer returned from "OGR_G_SymmetricDifference".

======================================================================
ERROR: test_union (gis_tests.gdal_tests.test_geom.OGRGeomTest)
Testing union().
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 417, in test_union
    u2 = a.union(b)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 498, in union
    return self._geomgen(capi.geom_union, other)
  File "/repo/django/django/contrib/gis/gdal/geometries.py", line 455, in _geomgen
    return OGRGeometry(gen_func(self.ptr, other.ptr), self.srs)
  File "/repo/django/django/contrib/gis/gdal/prototypes/errcheck.py", line 83, in check_geom
    raise GDALException('Invalid geometry pointer returned from "%s".' % func.__name__)
django.contrib.gis.gdal.error.GDALException: Invalid geometry pointer returned from "OGR_G_Union".

======================================================================
FAIL: test_contains (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 511, in test_contains
    self.assertIs(OGRGeometry('POINT(0 0)').contains(OGRGeometry('POINT(0 0)')), True)
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_crosses (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 515, in test_crosses
    self.assertIs(OGRGeometry('LINESTRING(0 0, 1 1)').crosses(OGRGeometry('LINESTRING(0 1, 1 0)')), True)
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_disjoint (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 520, in test_disjoint
    self.assertIs(OGRGeometry('LINESTRING(0 0, 0 1)').disjoint(OGRGeometry('LINESTRING(1 0, 1 1)')), True)
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_equals (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 523, in test_equals
    self.assertIs(OGRGeometry('POINT(0 0)').contains(OGRGeometry('POINT(0 0)')), True)
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_overlaps (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 531, in test_overlaps
    self.assertIs(
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_touches (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 539, in test_touches
    self.assertIs(
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

======================================================================
FAIL: test_within (gis_tests.gdal_tests.test_geom.OGRGeomTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/repo/django/tests/gis_tests/gdal_tests/test_geom.py", line 545, in test_within
    self.assertIs(
  File "/usr/lib/python3.8/unittest/case.py", line 1193, in assertIs
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: False is not True

----------------------------------------------------------------------
Ran 531 tests in 22.801s

FAILED (failures=7, errors=7, skipped=13)

Operating system

Ubuntu 20.04.2 LTS

GDAL version and provenance

3.2.2 built from source (https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.gz)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions