Opened 11 years ago

Closed 11 years ago

#2099 closed defect (fixed)

GEOSOffsetCurve: IllegalArgumentException: RobustDeterminant encountered non-finite numbers

Reported by: mamay Owned by: strk
Priority: high Milestone: PostGIS GEOS
Component: postgis Version: 2.0.x
Keywords: ST_OffsetCurve, history Cc:

Description

When running following query:

select st_asewkt(ST_Transform(St_Buffer(ST_OffsetCurve(st_geomfromtext('LINESTRING(149.544806520518 -26.2699794095638,149.544767045802 -26.2699496303918,149.544767045802 -26.2699496303918,149.544762544299 -26.269945128889)', 4283), 3.0, 'quad_segs=4 join=mitre mitre_limit=2.0'), (abs(3.0))::FLOAT, 'quad_segs=4 endcap=flat join=mitre'), 4283)) 

postgresql either closes connection or completely crashes, depending on os.

  1. opensuse 12.2 64 - The connection to the server was lost
  2. ubuntu 11.10 64/32 - the query just hangs.
  3. windows 7 64 - conecction closed, postgresql service shut down, reuire manual start.
  4. windows 7 32 - GEOSOffsetCurve: IllegalArgumentException: RobustDeterminant encountered non-finite numbers

postgis version installed on opensuse: "POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" TOPOLOGY RASTER"

With other geometry the query runs ok. For example:

select st_asewkt(ST_Transform(St_Buffer(ST_OffsetCurve(st_geomfromtext('LINESTRING(149.501849 -26.274435,149.50227 -26.274437,149.502272 -26.274145,149.502315 -26.274144,149.502411 -26.274142,149.502415 -26.274142,149.502448 -26.274139,149.502481 -26.274131,149.502512 -26.274121,149.502541 -26.274106,149.502568 -26.274088,149.502592 -26.274067,149.502612 -26.274043,149.502629 -26.274017,149.502642 -26.27399,149.502651 -26.273961,149.502655 -26.273931,149.502656 -26.273921,149.502656 -26.273919)', 4283), 3.0, 'quad_segs=4 join=mitre mitre_limit=2.0'), (abs(3.0))::FLOAT, 'quad_segs=4 endcap=flat join=mitre'), 4283))

Change History (12)

comment:1 by robe, 11 years ago

Mamay,

Can you also provide us with version of PostgreSQL you are running on each:

SELECT version();

I've seen different behaviors on different PostgreSQL versions too, though I haven't had a chance to test this particular example you have.

comment:2 by robe, 11 years ago

Milestone: PostGIS 2.1.0PostGIS 2.0.2

comment:3 by mamay, 11 years ago

PostgreSQL 9.1.6 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773], 64-bit

PostgreSQL 9.1.5 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1, 64-bit

from local and server machines.

comment:4 by strk, 11 years ago

Priority: mediumblocker

Confirmed, also with GEOS-3.3.6 and PostGIS-2.0.2SVN r10643.

Simplified version:

select ST_OffsetCurve('LINESTRING(149.544806520518
 -26.2699794095638,149.544767045802 -26.2699496303918,149.544767045802
 -26.2699496303918,149.544762544299 -26.269945128889)', 1);

The input line is simple. Hadn't tried directly with GEOS.

comment:5 by strk, 11 years ago

Owner: changed from pramsey to strk

comment:6 by strk, 11 years ago

Status: newassigned

comment:7 by strk, 11 years ago

Keywords: history added

Fixed the crash with r10704 in 2.0 branch and r10705 in trunk. The exception itself would be a GEOS issue.

comment:8 by strk, 11 years ago

Milestone: PostGIS 2.0.2PostGIS GEOS
Priority: blockerhigh

comment:9 by mamay, 11 years ago

Hello guys,

Update on this issue:

after previous fix I have recompiled postgis to POSTGIS="2.0.2SVN r10191" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.2" LIBJSON="UNKNOWN" RASTER

But when executing following query:

select ST_OffsetCurve('LINESTRING(149.536935 -26.1994070007468,149.536737 -26.19960093,149.536935 -26.1994070007468,149.536737 -26.1996010007468,149.536935 -26.1994070007468,149.536935 -26.1994070007468,149.536935 -26.1994070007468)', 3, 'quad_segs=4 join=mitre mitre_limit=2.0')

linux postgresql completely hangs, only restart helped. windows postgres service shutdown with message: Error

no connection to the server

Connection reset. Though on windows ———-

POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" G

DAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER

Thank you,

Alex.

comment:10 by strk, 11 years ago

This is what you should get (which I get here):

ERROR:  GEOSOffsetCurve: IllegalArgumentException: RobustDeterminant encountered non-finite numbers 

This is with GEOS-3.3.6. Try upgrading ?

comment:11 by mamay, 11 years ago

Hi all,

have tried with GEOS="3.3.9-CAPI-1.7.9" and it works OK!

Thanks for fixing.

comment:12 by strk, 11 years ago

Resolution: fixed
Status: assignedclosed

thank you for testing!

Note: See TracTickets for help on using tickets.