[geos-devel] signal 11 with GEOS rc4_svn and postgis 1.2.1

Carl Anderson carl.anderson at co.fulton.ga.us
Tue Feb 20 11:06:02 EST 2007


WRT the latest Signal11
I compiled all debugging off in GEOS and no longer see it.  I will retry 
and let you know.
There is some lint that no longer works, hidden in #ifdef  debugging 
blocks. 
try ./configure CXXFLAGS=-DGEOS_DEBUG to see some of the problems.


I have run into the nasty bug you mentioned a week or so ago.

I enabled GEOS_DEBUG in overlay/PolygonBuilder.cpp
and ran XMLTester on the problem test.

I see that inResult is set to 0 for both Directed Edged parts of the 
Edge of the problem ring.
 From there buildMaximalEdgeRing skips the Edge entirely when building a 
Polygon.
The hole allocation routine then assumes the unallocated ring is a hole 
and attempts to assign
the hole to a shell and doesn't find any.

So I am back tracking through the mechanism that sets inResult for a 
Directed Edge to see why
the problem ring does not get tagged as inResult.

C.

strk at refractions.net wrote:
>
> On Fri, Feb 16, 2007 at 06:50:09PM -0500, Carl Anderson wrote:
> > I ran it through XMLTester without any problems.
> >
> > I got a production PostGIS and a development PostGIS server to crash
> > with the SQL statement.
>
> Here's my result:
>
> =# select astext(intersection('POLYGON((0 0,0 1,1 1,1 0,0 0))', 
> 'POLYGON((10 10,10 11,11 11,11 10,10 10))'));
>  GEOMETRYCOLLECTION EMPTY
>
> PGSQL versioN;
>
>  PostgreSQL 8.1.8 on i486-pc-linux-gnu, compiled by GCC 
> gcc-4.0.gcc-opt (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
>
> Postgis versions:
>
>  POSTGIS="1.2.0" GEOS="3.0.0rc4-CAPI-1.3.2" PROJ="Rel. 4.4.9, 29 Oct 
> 2004" USE_STATS
>  POSTGIS="1.2.1" GEOS="3.0.0rc4-CAPI-1.3.2" PROJ="Rel. 4.4.9, 29 Oct 
> 2004" USE_STATS
>
> --strk;
>
> >
> >
> > strk at refractions.net wrote:
> > >
> > >The attached XML can be run by GEOS's XMLTester standalone, to
> > >get PostGIS out of the way.
> > >It works fine here, with both inlines enabled or disabled.
> > >Do you get a segfault on your side ?
> > >
> > >--strk;
> > >
> > >On Fri, Feb 16, 2007 at 05:05:51PM -0500, Carl Anderson wrote:
> > >> I am getting Signal 11 faults from geos through Postgis  in the
> > >> following example,
> > >> where the geometries a and b do not really intersect.
> > >>
> > >>
> > >> select intersection(a, b) from
> > >>  (select geometry('POLYGON((0 0,0 1,1 1,1 0,0 0))') as a ,
> > >>     geometry('POLYGON((10 10,10 11,11 11,11 10,10 10))') as b
> > >>  ) as part
> > >>
> > >>
> > >> backtrace from Postgres 8.1.6, PostGIS 1.2.1
> > >>
> > >>
> > >> Reading symbols from /usr/lib/libgeos-3.0.0rc4.so...done.
> > >> Loaded symbols for /usr/lib/libgeos-3.0.0rc4.so
> > >> Reading symbols from /usr/lib/libstdc++.so.6...done.
> > >> Loaded symbols for /usr/lib/libstdc++.so.6
> > >> Reading symbols from /lib/libgcc_s.so.1...done.
> > >> Loaded symbols for /lib/libgcc_s.so.1
> > >> 0x00ecd402 in __kernel_vsyscall ()
> > >> (gdb) continue
> > >> Continuing.
> > >>
> > >> Program received signal SIGSEGV, Segmentation fault.
> > >> 0x06fd4199 in geos::geom::operator<< () from
> > >/usr/lib/libgeos-3.0.0rc4.so
> > >> (gdb) bt
> > >> #0  0x06fd4199 in geos::geom::operator<< () from
> > >> /usr/lib/libgeos-3.0.0rc4.so
> > >> #1  0x06fd42a7 in geos::geom::Coordinate::toString () from
> > >> /usr/lib/libgeos-3.0.0rc4.so
> > >> #2  0x06fcd98e in geos::algorithm::LineIntersector::toString () from
> > >> /usr/lib/libgeos-3.0.0rc4.so
> > >> #3  0x0708094b in 
> geos::operation::overlay::OverlayOp::computeOverlay ()
> > >> from /usr/lib/libgeos-3.0.0rc4.s
> > >> #4  0x07080e90 in 
> geos::operation::overlay::OverlayOp::getResultGeometry
> > >> () from /usr/lib/libgeos-3.0.0rc4.so
> > >> #5  0x07081905 in geos::operation::overlay::OverlayOp::overlayOp 
> () from
> > >> /usr/lib/libgeos-3.0.0rc4.so
> > >> #6  0x004a8721 in geos::operation::overlay::overlayOp::operator() ()
> > >> from /usr/lib/libgeos_c.so.1
> > >> #7  0x004a8a32 in
> > >> geos::geom::BinaryOp<geos::operation::overlay::overlayOp> () from
> > >> /usr/lib/libgeos_c.so.1
> > >> #8  0x004a4ffc in GEOSIntersection () from /usr/lib/libgeos_c.so.1
> > >> #9  0x00f95398 in intersection (fcinfo=0xbf7fedb8) at
> > >lwgeom_geos_c.c:882
> > >> #10 0x081367fc in ExecMakeFunctionResult (fcache=0x9d82ac0,
> > >> econtext=0x99e0a40, isNull=0xbf7ff0ff "",
> > >>    isDone=0x0) at execQual.c:1095
> > >> (gdb)
> > >>
> > >>
> > >> --
> > >> Carl Anderson
> > >> GIS Manager Fulton County, Georgia
> > >> carl.anderson at co.fulton.ga.us
> > >> 404.730.8026
> > >>
> > >>
> > >> _______________________________________________
> > >> geos-devel mailing list
> > >> geos-devel at geos.refractions.net
> > >> http://geos.refractions.net/mailman/listinfo/geos-devel
> > >
> > >--
> > >
> > > ()   ASCII Ribbon Campaign
> > > /\   Keep it simple!
> > >
> > 
> >------------------------------------------------------------------------
> > >
> > ><run>
> > ><precisionModel type="FLOATING"/>
> > ><case>
> > ><a>
> > >POLYGON((0 0,0 1,1 1,1 0,0 0))
> > ></a>
> > ><b>
> > >POLYGON((10 10,10 11,11 11,11 10,10 10))
> > ></b>
> > ><test>
> > >     <op name="intersection">GEOMETRYCOLLECTION EMPTY</op>
> > ></test>
> > ></case>
> > >
> > ></run>
> > > 
> >
> >
> > --
> > Carl Anderson
> > GIS Manager Fulton County, Georgia
> > carl.anderson at co.fulton.ga.us
> > 404.730.8026
> >
>
> --
>
>  ()   ASCII Ribbon Campaign
>  /\   Keep it simple!
>


-- 
Carl Anderson
GIS Manager Fulton County, Georgia
carl.anderson at co.fulton.ga.us
404.730.8026





More information about the geos-devel mailing list