Opened 16 years ago

Closed 16 years ago

#156 closed defect (fixed)

ST_AsEWKT and ST_AsText crashes with some invalid geometries

Reported by: robe Owned by: mcayland
Priority: high Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4
Keywords: Cc:

Description

This geometry recently submitted on PostGIS newsgroup http://postgis.refractions.net/pipermail/postgis-users/2009-April/023204.html crashes PostgreSQL service in 1.4.0 (tried on windows and OpenSUSE linux) but just gives a non-closed rings error in 1.3.5 (don't have my 1.3.6 up yet to verify it doesn't misbehave in that)

SELECT ST_AsEWKT('0106000000010000000103000000010000000700000024213D12AA7BFD40945FF42576511941676A32F9017BFD40B1D67BEA7E511941C3E3C640DB7DFD4026CE38F4EE531941C91289C5A7EFD40017B8518E3531941646F1599AB7DFD409627F1F0AE521941355EBA49547CFD407B14AEC74652194123213D12AA7BFD40945FF42576511941')

Change History (7)

comment:1 by robe, 16 years ago

Owner: changed from mcayland to robe
Status: newassigned

comment:2 by robe, 16 years ago

Owner: changed from robe to mcayland
Status: assignednew

comment:3 by robe, 16 years ago

I tested this under 1.3.6SVN against PostgreSQL 8.4 beta 1 - and gives the non-closed rings error.

However in 1.4SVN against PostgreSQL 8.4 beta 1 — also crashes the PostgreSQL service. So we must have introduced something bad in 1.4 to make this crash.

comment:4 by mcayland, 16 years ago

Resolution: fixed
Status: newclosed

This appears to be the same as Paul's bug #168 which I have now fixed - I can confirm that the above statement now works correctly for me with latest SVN.

ATB,

Mark.

comment:5 by robe, 16 years ago

Resolution: fixed
Status: closedreopened

Mark,

This is not completely fixed. I can do the above now on the latest Postgis 1.4 build, however if I do the below — backend crashes (but the same exercise works fine in 1.3)

SELECT CAST('0106000000010000000103000000010000000700000024213D12AA7BFD40945FF42576511941676A32F9017BFD40B1D67BEA7E511941C3E3C640DB7DFD4026CE38F4EE531941C91289C5A7EFD40017B8518E3531941646F1599AB7DFD409627F1F0AE521941355EBA49547CFD407B14AEC74652194123213D12AA7BFD40945FF42576511941' As geometry);

comment:6 by mcayland, 16 years ago

Okay. Please update to the latest r4165 and see if that fixes it for you.

ATB,

Mark.

comment:7 by robe, 16 years ago

Resolution: fixed
Status: reopenedclosed

works

Note: See TracTickets for help on using tickets.