Ticket #159 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

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

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

Change History

Changed 4 years ago by rbranson

  Changed 4 years ago by rbranson

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

  Changed 4 years ago by pramsey

  • status changed from new to assigned

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?

  Changed 4 years ago by pramsey

  • milestone set to postgis 1.4.0

  Changed 4 years ago by robe

  • version set to 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

  Changed 4 years ago by pramsey

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.

  Changed 4 years ago by robe

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.

  Changed 4 years ago by robe

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

follow-up: ↓ 9   Changed 4 years ago by pramsey

  • owner changed from pramsey to robe
  • status changed from assigned to new

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

in reply to: ↑ 8   Changed 4 years ago by robe

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

  Changed 4 years ago by pramsey

I tested on 3.1 branch

  Changed 4 years ago by robe

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.

  Changed 4 years ago by robe

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.

  Changed 4 years ago by robe

  • status changed from new to closed
  • resolution set to worksforme

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.