[geos-devel] GEOS-3.3.0rc1 released

Sandro Santilli strk at keybit.net
Thu May 19 16:28:23 EDT 2011


On Thu, May 19, 2011 at 04:15:57PM -0400, Frank Warmerdam wrote:
> On 11-05-19 03:53 PM, Sandro Santilli wrote:
> 
> >The change in PolygonBuilder.cpp looks suspicious.
> >The "found two shells in MinimalEdgeRing" exception was even
> >triggered by a recently closed bug.
> >
> >Could you reverse that and file a ticket explaining why you'd need
> >to disable it when building with NDEBUG ?
> 
> Strk,
> 
> The definition of shellCount was already:
> 
> #ifndef NDEBUG
> 	int shellCount=0;
> #endif
> 
> It seems clear, in context, that the shellCount related stuff was setup
> to be a debug-only build check.  I have no idea why. 

Ok, the correct fix is to remove the NDEBUG check around the declaration
of shellCount. It was like that because what is now an exception used
to be an assertion, but we found real world input data triggering it,
and Martin Davis agreed on turning that assertion into an exception
as it due to numerical stability and can thus be handled.

> All I did was
> extend things accordingly.  So I'm not really inclined to back it out,
> and file a ticket.  But if you think that the shellCount checks and
> corresponding exception should always be evaluated then I would suggest
> filing a ticket to that effect and we can remove all the #ifndef NDEBUG
> wrappers for shellCount stuff.

Yes, that's the way to go. 
We can avoid a ticket, but could you please commit the wrapper removal ?

NOTE: I know it's annoying to file tickets, but it is currently our
      only way to comment about changes in context. Maybe a commit mailing
      list would make that easier.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the geos-devel mailing list