﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30046	GeometryCollection causes SIGABRT if initialized with an empty Polygon and a Point	Matevž Poljanc	Sergey Fedoseev	"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)
}}}"	Bug	closed	GIS	2.1	Normal	invalid	GeometryCollection		Accepted	0	0	0	0	0	0
