[geos-devel] [GEOS] #763: Overlay operator crash
GEOS
geos-trac at osgeo.org
Sat Jan 16 18:43:52 PST 2016
#763: Overlay operator crash
------------------------+--------------------------
Reporter: pramsey | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.5.1
Component: Default | Version: 3.5.0
Severity: Unassigned | Keywords:
------------------------+--------------------------
This was reported by a postgis user:
{{{
with a as(select ST_GeomFromText('LINESTRING(1031866.54
248543.54,1031876.58 248482.73,1031835.96 248503.82)') as geom )
select
St_difference(
ST_EXTERIORRING (ST_Buffer( geom, 25 , 'endcap=flat join=round' )),
ST_collect(
ST_OffsetCurve(geom, 25, 'join=round'),
ST_OffsetCurve(geom, -25, 'join=round')
)
) as geom
from a
}}}
Unfortunately it requires all the operations to get to the crash, which
doesn't occur until the final difference.
{{{
* thread #1: tid = 0x1385b22, 0x00000001153ea548
libgeos-3.5.0dev.dylib`geos::geom::Coordinate::equals2D(this=0x00007fc70ad029f0,
other=0x0000000000000000) const + 24 at Coordinate.inl:52, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0x0)
* frame #0: 0x00000001153ea548
libgeos-3.5.0dev.dylib`geos::geom::Coordinate::equals2D(this=0x00007fc70ad029f0,
other=0x0000000000000000) const + 24 at Coordinate.inl:52
frame #1: 0x00000001153e9f4d
libgeos-3.5.0dev.dylib`geos::geom::operator==(a=0x00007fc70ad029f0,
b=0x0000000000000000) + 29 at Coordinate.inl:123
frame #2: 0x00000001154094bb
libgeos-3.5.0dev.dylib`geos::algorithm::PointLocator::locate(this=0x00007fff54434ee8,
p=0x00007fc70ad029f0, l=0x00007fc70ad01f50) + 91 at PointLocator.cpp:118
frame #3: 0x0000000115409a70
libgeos-3.5.0dev.dylib`geos::algorithm::PointLocator::computeLocation(this=0x00007fff54434ee8,
p=0x00007fc70ad029f0, geom=0x00007fc70ad01fc0) + 720 at
PointLocator.cpp:78
frame #4: 0x00000001154093f8
libgeos-3.5.0dev.dylib`geos::algorithm::PointLocator::locate(this=0x00007fff54434ee8,
p=0x00007fc70ad029f0, geom=0x00007fc70ad01fc0) + 376 at
PointLocator.cpp:54
frame #5: 0x00000001155716cf
libgeos-3.5.0dev.dylib`geos::operation::overlay::OverlayOp::labelIncompleteNode(this=0x00007fff54434e48,
n=0x00007fc70ad029b0, targetIndex=1) + 127 at OverlayOp.cpp:412
frame #6: 0x0000000115571516
libgeos-3.5.0dev.dylib`geos::operation::overlay::OverlayOp::labelIncompleteNodes(this=0x00007fff54434e48)
+ 1126 at OverlayOp.cpp:390
frame #7: 0x000000011556f032
libgeos-3.5.0dev.dylib`geos::operation::overlay::OverlayOp::computeOverlay(this=0x00007fff54434e48,
opCode=opDIFFERENCE) + 2258 at OverlayOp.cpp:794
frame #8: 0x000000011556dc8f
libgeos-3.5.0dev.dylib`geos::operation::overlay::OverlayOp::getResultGeometry(this=0x00007fff54434e48,
funcCode=opDIFFERENCE) + 31 at OverlayOp.cpp:187
frame #9: 0x000000011556dbc0
libgeos-3.5.0dev.dylib`geos::operation::overlay::OverlayOp::overlayOp(geom0=0x00007fc70ad02030,
geom1=0x00007fc70ad01fc0, opCode=opDIFFERENCE) + 64 at OverlayOp.cpp:93
frame #10: 0x000000011542ee87
libgeos-3.5.0dev.dylib`geos::operation::overlay::overlayOp::operator(this=0x00007fff54435470,
g0=0x00007fc70ad02030, g1=0x00007fc70ad01fc0)(geos::geom::Geometry const*,
geos::geom::Geometry const*) + 39 at OverlayOp.h:388
frame #11: 0x0000000115427d7e
libgeos-3.5.0dev.dylib`std::__1::auto_ptr<geos::geom::Geometry>
geos::geom::BinaryOp<geos::operation::overlay::overlayOp>(g0=0x00007fc70ad02030,
g1=0x00007fc70ad01fc0, _Op=(opCode = opDIFFERENCE)) + 158 at
BinaryOp.h:322
frame #12: 0x000000011542602a
libgeos-3.5.0dev.dylib`geos::geom::Geometry::difference(this=0x00007fc70ad02030,
other=0x00007fc70ad01fc0) const + 218 at Geometry.cpp:605
frame #13: 0x000000010c59f1ef
libgeos_c.1.dylib`::GEOSDifference_r(extHandle=0x00007fc70b834000,
g1=0x00007fc70ad02030, g2=0x00007fc70ad01fc0) + 159 at geos_ts_c.cpp:2098
frame #14: 0x000000010c58f414
libgeos_c.1.dylib`::GEOSDifference(g1=0x00007fc70ad02030,
g2=0x00007fc70ad01fc0) + 36 at geos_c.cpp:454
frame #15: 0x000000010c510cc0 postgis-2.3.so`lwgeom_difference + 352
frame #16: 0x000000010c489168 postgis-2.3.so`geos_difference + 88
frame #17: 0x000000010c48f1c8 postgis-2.3.so`difference + 40
frame #18: 0x000000010ba3c3e9
postgres`ExecMakeFunctionResultNoSets(fcache=0x00007fc70b82b898,
econtext=0x00007fc70b82b7a0, isNull="", isDone=0x00007fc70b843970) + 361
at execQual.c:2026
frame #19: 0x000000010ba35afd
postgres`ExecEvalFunc(fcache=0x00007fc70b82b898,
econtext=0x00007fc70b82b7a0, isNull="", isDone=0x00007fc70b843970) + 205
at execQual.c:2417
frame #20: 0x000000010ba3b1a5
postgres`ExecTargetList(targetlist=0x00007fc70b843938,
econtext=0x00007fc70b82b7a0, values=0x00007fc70b843810, isnull="",
itemIsDone=0x00007fc70b843970, isDone=0x00007fff54435ea4) + 181 at
execQual.c:5307
frame #21: 0x000000010ba3b0ba
postgres`ExecProject(projInfo=0x00007fc70b843850,
isDone=0x00007fff54435ea4) + 778 at execQual.c:5522
frame #22: 0x000000010ba3c95d
postgres`ExecScan(node=0x00007fc70b82b458, accessMtd=(postgres`CteScanNext
at nodeCtescan.c:32), recheckMtd=(postgres`CteScanRecheck at
nodeCtescan.c:139)) + 493 at execScan.c:207
frame #23: 0x000000010ba5e849
postgres`ExecCteScan(node=0x00007fc70b82b458) + 41 at nodeCtescan.c:155
frame #24: 0x000000010ba2ec61
postgres`ExecProcNode(node=0x00007fc70b82b458) + 433 at execProcnode.c:434
frame #25: 0x000000010ba2a426
postgres`ExecutePlan(estate=0x00007fc70b82ac38,
planstate=0x00007fc70b82b458, operation=CMD_SELECT, sendTuples='\x01',
numberTuples=0, direction=ForwardScanDirection, dest=0x00007fc70b836c78) +
118 at execMain.c:1490
frame #26: 0x000000010ba2a34b
postgres`standard_ExecutorRun(queryDesc=0x00007fc70b824838,
direction=ForwardScanDirection, count=0) + 523 at execMain.c:319
frame #27: 0x000000010ba2a12d
postgres`ExecutorRun(queryDesc=0x00007fc70b824838,
direction=ForwardScanDirection, count=0) + 77 at execMain.c:267
frame #28: 0x000000010bbec909
postgres`PortalRunSelect(portal=0x00007fc70b828c38, forward='\x01',
count=0, dest=0x00007fc70b836c78) + 329 at pquery.c:942
frame #29: 0x000000010bbec2d0
postgres`PortalRun(portal=0x00007fc70b828c38, count=9223372036854775807,
isTopLevel='\x01', dest=0x00007fc70b836c78, altdest=0x00007fc70b836c78,
completionTag="") + 704 at pquery.c:786
frame #30: 0x000000010bbe798a
postgres`exec_simple_query(query_string="with a as(select
ST_GeomFromText('LINESTRING(1031866.54 248543.54,1031876.58
248482.73,1031835.96 248503.82)') as geom )\nselect St_difference(
ST_EXTERIORRING (ST_Buffer( geom, 25 , 'endcap=flat join=round' )),\n
ST_collect(ST_OffsetCurve(geom, 25, 'join=round'), ST_OffsetCurve(geom,
-25, 'join=round')) ) as geom\n from a\n;") + 1258 at postgres.c:1072
frame #31: 0x000000010bbe6c74 postgres`PostgresMain(argc=1,
argv=0x00007fc70b003cb0, dbname="postgis23", username="pramsey") + 2868 at
postgres.c:4079
}}}
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/763>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list