-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
intersection() infinite loop for valid MultiPolygons. #62
Comments
Confirmed the above bug is still there after a fresh git pull and rebuild just now. |
It's resolved in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried to narrow this down as tight as I could. The initial polygons that generated the error had many more points, but I removed as many as possible to still produce the error. This call below will cause an infinite loop and crash the JS stack:
I stepped through it in the debugger.
connectEdges()
gets caught in an endless loop on thei=6
iteration of thefor(i = 0
loop. More specifically in the innerwhile(pos >= i)
loop wherenextPos()
continuously returns 12 for the nextpos
value, and the same coordinate is added toresultEvents
until the JS stack runs out of memory.It's a little tough for me to understand how the code is meant to work with my current ignorance, or I would probably just fix the bug and send you the fix. I'll keep messing around with it. Insights, ideas, or of course, your own bug fix would be very welcome.
The text was updated successfully, but these errors were encountered: