Opened 6 years ago

Closed 6 years ago

#30046 closed Bug (invalid)

GeometryCollection causes SIGABRT if initialized with an empty Polygon and a Point

Reported by: Matevž Poljanc Owned by: Sergey Fedoseev
Component: GIS Version: 2.1
Severity: Normal Keywords: GeometryCollection
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Constructor for GeometryCollection can cause entire Django server to crash with Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
if called with an empty Polygon and a Point as arguments.


Minimal code for reproducing the bug:

from django.contrib.gis.geos import Point, Polygon, GeometryCollection

polygon = Polygon()
point = Point(0, 0)

GeometryCollection(polygon, point)

To make it even stranger, if order of arguments is reversed then no problems are encountered. The code below will execute fine:

from django.contrib.gis.geos import Point, Polygon, GeometryCollection

polygon = Polygon()
point = Point(0, 0)

GeometryCollection(point, polygon)

Output when error is encountered:

python: geos_ts_c.cpp:3723: char GEOSHasZ_r(GEOSContextHandle_t, const geos::geom::Geometry*): Assertion `0 != g->getCoordinate()' failed.
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Change History (2)

comment:1 by Sergey Fedoseev, 6 years ago

Owner: changed from nobody to Sergey Fedoseev
Status: newassigned
Triage Stage: UnreviewedAccepted

Reproduced it with libgeos 3.7.1 on master (1939dd49d142b65fa22eb5f85cee0d20864d3730), but to trigger it you should do str(GeometryCollection(polygon, point)) or GeometryCollection(polygon, point).hasz.

Accepting for the investigation, though probably it's bug in libgeos itself.

comment:2 by Sergey Fedoseev, 6 years ago

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top