Opened 16 years ago

Last modified 16 years ago

#65 closed task (fixed)

ST_AsGML kills the backend when fed a CIRCULAR STRING

Reported by: robe Owned by: robe
Priority: medium Milestone:
Component: postgis Version:
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. SELECT ST_AsGML(ST_GeometryFromText('CURVEPOLYGON(CIRCULARSTRING(4

2,3.12132034355964 -0.121320343559641,1 -1,-1.12132034355962 4.12132034355966,4 2))')); Get this error: WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. 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: Succeeded. (Tried on OpenSUSE 1.3.4SVN and Windows 1.3.3 both with similar disastrous effects.

Note: other functions such as ST_AsKML, ST_AsGeoJSON - simply return this geometry type is not supported.

Change History (2)

comment:1 by mcayland, 16 years ago

Okay - I've applied a fix for this to 1.3 SVN and trunk. It looks like the ST_AsGML() function was trying to inspect geometries by default, rather than throwing an error on unknown types like the other ST_As*() functions. Since there is no support for types other than the basic OGC types, I've made ST_AsGML() do the same.

ATB,

Mark.

comment:2 by mcayland, 16 years ago

One more thing: I've also applied a fix to lwgeom_typename() which wasn't correctly returning a valid string for the newer geometry types. So now the error message correctly reads:

postgis=# SELECT ST_AsGML(ST_GeometryFromText('CURVEPOLYGON(CIRCULARSTRING(4 2,3.12132034355964 -0.121320343559641,1 -1,-1.12132034355962 4.12132034355966,4 2))')); ERROR: geometry_to_gml2: 'CurvePolygon' geometry type not supported CONTEXT: SQL function 'st_asgml' statement 1

ATB,

Mark.

Note: See TracTickets for help on using tickets.