-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault (core dumped) when running on large polygons #18
Comments
Thanks for the report! I'm quite busy at the moment, but I'll install Red Hat in a VM to debug it when I can. However, my best guess would be that there is a problem with the GMP or MPFR libraries, which are needed for exact arithmetic. Did you compile them yourself or got them from a repository? In RPM perhaps? |
Hello Ken, |
any ideas on this? i am also getting the same |
Any updates on this issue? I'm having the same issue while trying to prepair polygons that span the entirety of the USA land boundary. |
Sorry, but it wasn't a trivial thing to debug and I've been busy with other projects. I'll have another look at it. |
Thank you! I was using the improvements-with-ogr branch. |
I ran into the same issue with the improvements-with-ogr branch, that it was producing a segmentation fault when processing large/complex polygons. After some investigation, it appeared the cause was a certain malloc call, which results in a stack overflow. I circumvented the issue by setting the core file size (I don't think core file size change is necessary, but haven't tried it without it) and the stack size to unlimited. I was able to process the polygons which were previously resulting in the aforementioned error. |
@AlexRiggs how did you increase the stack size to unlimited ? On ubuntu I tried using "ulimit -s", it didn't fix the problem, I don't know if it is the right command. |
@albanm the commands I used are as follows:
the -a flag just displays the ulimit settings, use it to verify the changes. Hope this helps! |
Thanks! Unfortunately it seems that my problem is not related to the polygon size. After closer inspection it happens on a small broken polygon (4 points including 2 duplicates). |
Ah that's a shame. You may have already thought of this but it may be
easiest to load the polygon into QGIS or ArcGIS, select that specific
polygon and repair it by hand or with one of the built-in repair tools. It
sounds like it may just be a weird unhandled edge case for prepair.
If that doesn't work, the other thing you could try is running prepair with
the bash C-debugger (gdb) and check the log files, might give you a more
informative error than just Segmentation Fault.
Best of luck!
…On Tue, Sep 11, 2018 at 11:04 AM, Alban Mouton ***@***.***> wrote:
Thanks! Unfortunately it seems that my problem is not related to the
polygon size.
After closer inspection it happens on a small broken polygon (4 points
including 2 duplicates).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ad6A0XkwJMzHiCM8sUcbPrgZgjQ2lhC-ks5uZ-0qgaJpZM4EI_ho>
.
|
It is alright in the end, this polygon is actually impossible to repair in my opinion and it is just one in many in a large dataset. So I just catch the error, log it, consider that I did the best I could and go on to the next feature. I use prepair as well as turfjs' cleanCoords and rewind, and it seems that almost all features are clean afterwards. |
when running at your dataset (Data/CLC2006_180927.geojson)
prepair --ogr CLC2006_180927.geojson
I get a segmentation fault (core dumped)
(small polygons are ok)
DETAILS:
branch: master:
OS: RHEL 6.2 (Santiago)
compiled by gcc 4.4.7
Boost 1.41.0
CGAL 4.6
The text was updated successfully, but these errors were encountered: