Opened 16 years ago

Closed 15 years ago

#159 closed defect (worksforme)

PostGIS Crash

Reported by: rbranson Owned by: robe
Priority: medium Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4
Keywords: Cc:

Description

Attached manglered geometry crashes PostGIS when ST_IsValidReason() is executed. PostgreSQL 8.3.7, PostGIS SVN, GEOS 3.1.0.

Attachments (1)

crasher.wkt (55.5 KB ) - added by rbranson 16 years ago.

Download all attachments as: .zip

Change History (14)

by rbranson, 16 years ago

Attachment: crasher.wkt added

comment:1 by rbranson, 16 years ago

This is on Intel MacOS X 10.5.6. I can ST_Buffer(geometry, 0) this and ST_IsValidReason() returns 'Valid Geometry'.

comment:2 by pramsey, 16 years ago

Status: newassigned

I'm not seeing a crash OS/X 10.5.6, PostGIS-SVN, GEOS-SVN.

postgis14=# select st_isvalidreason(geom) from wkt;
                st_isvalidreason                 
-------------------------------------------------
 Ring Self-intersection[-1.31849e+07 6.7875e+06]
(1 row)

Can you give the exact SQL that causes a crash for you?

comment:3 by pramsey, 16 years ago

Milestone: postgis 1.4.0

comment:4 by robe, 16 years ago

Version: 1.4

FWIW:

Tested this on Windows XP -- PostgreSQL 8.4 beta 1, postgis 1.4.0 SVN, and GEOS 3.1.0 and

Doing an ST_IsValidReason on the attached geometry gives: Ring Self-intersection [-1.31849e+07 6.7875e+06]

However doing a

SELECT ST_IsValidReason(ST_Buffer(....geometry wkt goes here--,0))

Crashes server. This sounds like another manifestation of #81

comment:5 by pramsey, 16 years ago

rbranson notes that he can ST_Buffer(,0) it, that it's the ST_IsValidReason() that crashes, but I'm not seeing this on my machine which is very close to his. Hence I'd like to see his exact SQL that causes the crash.

comment:6 by robe, 16 years ago

Paul,

So can you buffer the attached geometry okay on your install. I can't on any of my windows ones (haven't tried on Linux) but then I'm running the production geos 1.4.0 not the SVN one.

comment:7 by robe, 16 years ago

Sorry hmm I meant I'm using GEOS 3.1.0 released version not the SVN one and the PostGIS 1.4.0 SVN

comment:8 by pramsey, 15 years ago

Owner: changed from pramsey to robe
Status: assignednew

I still can't make this fail on my setup. Re-assigning to robe.

in reply to:  8 comment:9 by robe, 15 years ago

Replying to pramsey:

I still can't make this fail on my setup. Re-assigning to robe.

so you tested on GEOS 3.1 release or GEOS 3.2SVN or 3.1.1 both. I'll test with the newer on Windows once I get my newer GEOS compiled. Anyrate will test on OpenSUSE.

My problem could be the same as #182 which appears to be resolved in 3.1.1

comment:10 by pramsey, 15 years ago

I tested on 3.1 branch

comment:11 by robe, 15 years ago

Okay I just tested on my windows xp with PostGIS 1.4, Windows Vista, PostgreSQL 8.3.7 with the release version of GEOS 3.1.0.

I don't seem to be able to cause an error. ST_IsValid returns false, ST_IsValidReason returns - Ring Self-intersection [-1.31849e+007 6.7875e+006] and ST_Buffer(..,0) doesn't crash. I'll have to test on my other box later.

Given that rbranson is crashing, I can only assume he did a ST_AsText of the offending geometry and his crash.wkt is really not the crasher.

RBranson - can you try your crasher.wkt and verify it really is the culprit and if that does work fine, can you send us the ST_AsBinary of the real geometry you were testing with.

comment:12 by robe, 15 years ago

correction I mean the hexewkb representation -- just what you get without applying any conversion. The sT_AsText will truncate the lower decimals so may not be a true rep of the offending geometry.

comment:13 by robe, 15 years ago

Resolution: worksforme
Status: newclosed

Paul and I can't replicate this on our boxes so the attached is probably not the real crasher. Even so I doubt this is a PostGIS bug. Sounds more like a GEOS one which may have been fixed already.

Note: See TracTickets for help on using tickets.