Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3704 closed defect (fixed)

ST_AsX3D returns random data / crashes client

Reported by: Mike Taves Owned by: robe
Priority: critical Milestone: PostGIS 2.3.3
Component: postgis Version: 2.3.x
Keywords: Cc:


Testing ST_AsX3D on various geometries gives varied and interesting results with PostGIS 2.3 on Windows. I think these are critical bugs, because they return random data or crash the client.

has unexpected behavior, often returning a zero-length string, or random junk like @ or 2.3.dll, but sometimes raising:

ERROR: invalid byte sequence for encoding "UTF8": 0xec 0xa3

kills the client:

server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

The connection to the server was lost. Attempting reset: Failed. !>

Non-critical bugs with other geometry types will be filed in the next bug report…

Change History (5)

comment:1 by robe, 7 years ago

Owner: changed from pramsey to robe

comment:2 by robe, 7 years ago

ah indeed. More concerning is why my garden test didn't pick this up as this would be one that should have been tested.

comment:3 by robe, 7 years ago

In 15444:

ST_AsX3D handle empty geometries
References #3704 for PostGIS 2.4 (trunk)

comment:4 by robe, 7 years ago

Resolution: fixed
Status: newclosed

In 15445:

ST_AsX3D handle empty geometries
Closes #3704 for PostGIS 2.3.3

comment:5 by robe, 7 years ago

okay figured out why garden test didn't pick this up. It was testing this:

SELECT ST_AsX3D(foo1.the_geom, 3, 5)  As result
							FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom ) ) As foo1 LIMIT 3;

Which because of the limit never got to testing LINESTRING EMPTY. Guess I got to increase the limit on this so covers the number of empties.

Note: See TracTickets for help on using tickets.