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

StackOverflow Error for intersect of multiple extents if one intersection is empty #12

Open
felixcremer opened this issue Jul 13, 2023 · 1 comment

Comments

@felixcremer
Copy link
Contributor

When I try to compute the intersect of multiple Extents and the intersect of one of the combinations is empty I get a StackOverflowError.
I would have expected, that the result would be nothing because the intersection of these Extent should be empty:

julia> Extents.intersect(Extent(X=(1,2), Y=(0,1)),Extent(),Extent(X=(1,3), Y=(-0.5,0.5)))
ERROR: StackOverflowError:
Stacktrace:
 [1] intersect(obj1::Nothing, obj2::Extent{(:X, :Y), Tuple{Tuple{Int64, Int64}, Tuple{Float64, Float64}}}) (repeats 79984 times)
   @ Extents ~/.julia/packages/Extents/D8Bv0/src/Extents.jl:161

If the empty Extent is at the end of the list this works and returns nothing as expected.

@rafaqz
Copy link
Owner

rafaqz commented Jul 13, 2023

Stackoverflow is not good...

Maybe Extent(X=nothing, Y=(1.0, 2.0)) ?

I dont know what makes the most sense

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

No branches or pull requests

2 participants