Skip to content
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

remove map function to fix overflow error with large Polygons #40

Merged
merged 3 commits into from
Nov 22, 2021

Conversation

NLaws
Copy link
Contributor

@NLaws NLaws commented Jun 24, 2021

When passing an array of Points with a length of 580754 to Polygon, i.e. Polygon(points...), I get :

ERROR: StackOverflowError:
Stacktrace:
 [1] map(f::Function, A::UnitRange{Int64})
   @ Base ./abstractarray.jl:2294
 [2] Polygon2D{Point2D}(::Point2D, ::Vararg{Point2D, N} where N)
   @ GeometricalPredicates ~/.julia/packages/GeometricalPredicates/OoUPy/src/GeometricalPredicates.jl:168
 [3] Polygon2D(::Point2D, ::Vararg{Point2D, N} where N)
   @ GeometricalPredicates ~/.julia/packages/GeometricalPredicates/OoUPy/src/GeometricalPredicates.jl:176
 [4] Polygon(::Point2D, ::Vararg{Point2D, N} where N)
   @ GeometricalPredicates ~/.julia/packages/GeometricalPredicates/OoUPy/src/GeometricalPredicates.jl:178
 [5] top-level scope
   @ ./REPL[50]:6

If I replace the map call with a for loop the overflow error no longer occurs.

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #40 (606e531) into master (ee8a110) will increase coverage by 0.32%.
The diff coverage is 100.00%.

❗ Current head 606e531 differs from pull request most recent head 8794246. Consider uploading reports for the commit 8794246 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage   91.72%   92.04%   +0.32%     
==========================================
  Files           1        1              
  Lines         556      591      +35     
==========================================
+ Hits          510      544      +34     
- Misses         46       47       +1     
Impacted Files Coverage Δ
src/GeometricalPredicates.jl 92.04% <100.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ab422e...8794246. Read the comment docs.

src/GeometricalPredicates.jl Outdated Show resolved Hide resolved
src/GeometricalPredicates.jl Outdated Show resolved Hide resolved
NLaws and others added 2 commits October 27, 2021 12:00
specify array type and length

Co-authored-by: Steve Kelly <[email protected]>
@sjkelly
Copy link
Member

sjkelly commented Oct 28, 2021

Uggh. We didn't migrate this repo to GitHub actions...

@sjkelly sjkelly merged commit 543ff86 into JuliaGeometry:master Nov 22, 2021
@sjkelly
Copy link
Member

sjkelly commented Nov 22, 2021

Thanks!

@NLaws NLaws deleted the fixoverflow branch November 22, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants