[geos-devel] segfault against 3.3.0 C++

Matt Perry perrygeo at gmail.com
Sat Sep 10 11:15:01 EDT 2011


On Sat, Sep 10, 2011 at 3:09 AM, Sandro Santilli <strk at keybit.net> wrote:
> On Fri, Sep 09, 2011 at 07:46:26PM +0200, Peter Körner wrote:
>
>> Seems OGR's exportToGEOS() followed the recommendation* and
>> implemented the C-wrapper instead of the C++ library.
>
> No wonder that statically casting to Polygon* triggered segfaults...
> I'm surprised it didn't blow up the developer's machine :D
>

On the contrary, this code has worked for years (the software was
written around 2006) without any apparent troubles. It was only until
I compiled against 3.3.0 that segfaults started showing up ... and now
looking at the code I wonder how it ever worked in the first place!?
One thing is clear though; prior to 3.3 this code worked flawlessly.
Just out of curiosity, I'd like to know what changed and why this
worked at all.

So the 'right' solution is to rewrite the vector handling portions of
the software to use the GEOS C API. That's too big a project at the
moment so we'll probably just downgrade to 3.2.2 until we can
eventually drum up the resources to do it the right way.

Thanks for the help.

-- 
·´¯`·.¸. , . .·´¯`·.. ><((((º>`·.¸¸.·´¯`·.¸.·´¯`·...¸><((((º>
"The best way to predict the future is to invent it."  -- Alan Kay
Matthew T. Perry
http://www.perrygeo.net
http://viedevelo.wordpress.com


More information about the geos-devel mailing list