tudelft3d / pprepair

Validation and Automatic Repair of Planar Partitions
GNU General Public License v3.0
57 stars 22 forks source link

Error: std::bad_alloc #7

Closed ldemaz closed 11 years ago

ldemaz commented 11 years ago

Hello, I have been working with pprepair, and it is doing quite nicely (I call it from R to clean up polygons I am analyzing). So far, it has worked in most cases, but I have one set of test polygons I just came across that is giving me an error.

wget https://dl.dropbox.com/u/31890709/poly_bad.zip unzip poly_bad.zip pprepair -i poly_bad.shp -o poly_fix.shp

Adding a new set of polygons to the triangulation... Path: poly_bad.shp Type: ESRI Shapefile Layers: 1 Reading layer #1 (3 polygons)...

  double      dummy
    string      ID
Feature #0 (28 vertices): self intersecting outer boundary #0. Split.

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Abort

Any thoughts on how to fix will be very appreciated.

Thanks!

ldemaz commented 11 years ago

Sorry, I wrote an incomplete command. It should have been:

pprepair -i poly_bad.shp -o poly_fix.shp -fix

I should note that it hangs for quite a while during the process.

Thanks!

dmcritchie commented 11 years ago

I'm looking at it with the ddt debugger, and it appears to be in an infinite loop, which eventually runs out of memory.

Dennis

kenohori commented 11 years ago

Hi,

I also saw that it gets into an infinite loop somehow. I'm quite busy these days with a couple of deadlines, but I'll look at it in the coming weeks.

Cheers, Ken

kenohori commented 11 years ago

Thanks for the report!

dmcritchie commented 11 years ago

Some additional info:

Hope this helps.

Dennis

kenohori commented 11 years ago

It's fixed now :-). It was a nasty bug related to overlapping constraints in CGAL!

Cheers, Ken

dmcritchie commented 11 years ago

Thanks Ken! Much appreciated.

Dennis

ldemaz commented 11 years ago

And thanks from me, too! Cheers