Opened 11 years ago

Closed 11 years ago

#604 closed defect (fixed)

Delaunay Triangulation crash

Reported by: esseffe Owned by: strk
Priority: blocker Milestone: 3.4.0
Component: C API Version: main
Severity: Critical Keywords: Delaunay Triangulation
Cc:

Description

As reported by a SpatiaLite user GEOSDelaunyTriangulation() crashes when processing the input geom contained in the attached file (hex-wkb encoded)

I've personally tested on both Win (MinGW32) and Fedora 7 (64 bit) and I can confirm that a crash happens when GEOSDelaunayTriangulation is invoked on this input geom by passing tolerance = 0.001

it could be interesting to notice that by setting tolerance = 0.01 then the call to GEOSDelaunayTriangulation has full success and retun a full valid triangulation.

bye Sandro Furieri (spatialite maintainer)

Attachments (1)

GEOSDelaunayTriangulation-crash.txt (39.4 KB ) - added by esseffe 11 years ago.
hex-wkb geom causing crash to GEOSDelaunayTriangulation

Download all attachments as: .zip

Change History (11)

by esseffe, 11 years ago

hex-wkb geom causing crash to GEOSDelaunayTriangulation

comment:1 by robe, 11 years ago

Still crashes with a tolerance but doesn't crash without a tolerance.

Just tested on my PostgreSQL 9.2 x 64bit GEOS 3.4.0.

strk -- you think this can be fixed or we need to push?

comment:2 by robe, 11 years ago

forgot to mention on windows 2008 x 64bit PostgreSQL (EDB VC++ 2010) with PostGIS 2.1.0beta2 (compiled with mingw64 4.5.4)

comment:3 by strk, 11 years ago

needs to be fixed before 3.4.0 is out

comment:4 by robe, 11 years ago

Owner: changed from pramsey to strk
Priority: majorblocker

comment:5 by strk, 11 years ago

Doesn't crash here on GNU/Linux 64bit. It actually gives a valid answer. I call it with ST_DelaunayTriangulation('hexwkb'::geometry, 0.01)

Built with gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 GEOS="3.4.0dev-CAPI-1.8.0 r3834"

Is this a windows-only issue?

comment:6 by strk, 11 years ago

Status: newassigned

JasperE made me notice I was using the wrong tolerance. It crashes on linux too, with tolerance 0.001 !

comment:7 by strk, 11 years ago

Simpler input still exploiting the problem (Martin: can you try this with JTS?)

MULTIPOINT(-118.396404037152 56.0578648005664,-118.396406520762 56.0557919973472,-118.39637318468 56.051615076395,-118.396406 56.0489777518573,-118.396406 56.047576,-118.396407037416 56.046333494841,-118.39640718106 56.0462297053878,-118.396409 56.0452738526061,-118.396409 56.0435821586885,-118.396331493228 56.0146959807998,-118.396329675815 56.0142016445733,-118.396447480383 56.0089675804743,-118.396839053254 56.003746854893)

comment:8 by strk, 11 years ago

Further reduction (9 points):

MULTIPOINT(-118.396406520762 56.0557919973472,-118.396406 56.0489777518573,-118.396406 56.047576,-118.396407037416 56.046333494841,-118.39640718106 56.0462297053878,-118.396409 56.0452738526061,-118.396409 56.0435821586885,-118.396447480383 56.0089675804743,-118.396839053254 56.003746854893)

comment:9 by strk, 11 years ago

4 points reduction:

MULTIPOINT(-118.3964065 56.0557,-118.396406 56.0475,-118.396407 56.04,-118.3968 56)

comment:10 by strk, 11 years ago

Resolution: fixed
Status: assignedclosed

Memory management problem. Fixed with r3835

Note: See TracTickets for help on using tickets.