[geos-devel] Parallel use of GEOSPreparedIntersects_r

Thiago Borges thborges at gmail.com
Wed Jun 25 17:10:27 PDT 2014


Hi!

Can the GEOSPreparedIntersects_r function be called in parallel? For
distinct Geometries in each call (reentrant)?

I'm trying to implement a parallel intersection check (spatial join), but
I'm receiving some EXC_BAD_ACCESS and ": pointer being freed was not
allocated". Partial stack below.

Those errors don't happen when I replace GEOSPreparedIntersects_r by
GEOSIntersects_r in the same parallel code.

Stack sample 1:
------------------------------------------------------------------------------------------------------
* thread #2: tid = 0x36079, 0x0000000105730a40, stop reason =
EXC_BAD_ACCESS (code=2, address=0x105730a40)
  * frame #0: 0x0000000105730a40
    frame #1: 0x00000001001e3c87
libgeos-3.4.2.dylib`geos::noding::MCIndexSegmentSetMutualIntersector::intersectChains()
+ 225
    frame #2: 0x00000001001e163e
libgeos-3.4.2.dylib`geos::noding::FastSegmentSetIntersectionFinder::intersects(std::__1::vector<geos::noding::SegmentString
const*, std::__1::allocator<geos::noding::SegmentString const*> >*) + 84
    frame #3: 0x00000001001ba1f1
libgeos-3.4.2.dylib`geos::geom::prep::PreparedPolygonIntersects::intersects(geos::geom::Geometry
const*) + 131
    frame #4: 0x00000001001b9f79
libgeos-3.4.2.dylib`geos::geom::prep::PreparedPolygon::intersects(geos::geom::Geometry
const*) const + 155
    frame #5: 0x0000000100313006 libgeos_c.1.dylib`GEOSPreparedIntersects_r
+ 48
    frame #6: 0x0000000100028208
geosystem`threaded_refine_rj(ctx=refine_context at 0x0000000106080a00) +
856 at rtree-pjoin-rj.cpp:171
...
------------------------------------------------------------------------------------------------------

Stack sample 2:
------------------------------------------------------------------------------------------------------
* thread #2: tid = 0x3b0ff, 0x00007fff9056cbc0
libsystem_malloc.dylib`malloc_error_break, stop reason = breakpoint 2.1
  * frame #0: 0x00007fff9056cbc0 libsystem_malloc.dylib`malloc_error_break
    frame #1: 0x00007fff9056e028 libsystem_malloc.dylib`free + 324
    frame #2: 0x00000001001d2c43
libgeos-3.4.2.dylib`geos::index::intervalrtree::SortedPackedIntervalRTree::buildTree()
+ 163
    frame #3: 0x00000001001d3004
libgeos-3.4.2.dylib`geos::index::intervalrtree::SortedPackedIntervalRTree::query(double,
double, geos::index::ItemVisitor*) + 44
    frame #4: 0x000000010019e6db
libgeos-3.4.2.dylib`geos::algorithm::locate::IndexedPointInAreaLocator::locate(geos::geom::Coordinate
const*) + 67
    frame #5: 0x00000001001ba48a
libgeos-3.4.2.dylib`geos::geom::prep::PreparedPolygonPredicate::isAnyTestComponentInTarget(geos::geom::Geometry
const*) const + 132
    frame #6: 0x00000001001ba18a
libgeos-3.4.2.dylib`geos::geom::prep::PreparedPolygonIntersects::intersects(geos::geom::Geometry
const*) + 28
    frame #7: 0x00000001001b9f79
libgeos-3.4.2.dylib`geos::geom::prep::PreparedPolygon::intersects(geos::geom::Geometry
const*) const + 155
    frame #8: 0x0000000100313006 libgeos_c.1.dylib`GEOSPreparedIntersects_r
+ 48
    frame #9: 0x0000000100028208
geosystem`threaded_refine_rj(ctx=refine_context at 0x0000000106103a00) +
856 at rtree-pjoin-rj.cpp:171
------------------------------------------------------------------------------------------------------


-- 
Thiago Borges
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140625/508167a8/attachment.html>


More information about the geos-devel mailing list