You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. (I'm not sure why 1-arg vcat would be used over collect but I don't think that's the problem here).
However:
dispatching on the eltype of a container isn't good practice, because valid containers like Any[Interval(1,2)] won't get hit (and vcat doesn't help).
if, like in my case, you don't have valid intervals, you should get an error, not a stackoverflow
This is extra annoying on MacOS because of the longstanding Julia issue where stackoverflows don't error properly on MacOS.
The easiest fix for the stackoverflow would be to remove the first method, however that would break any code that relies on find_intersections doing this collecting for them. I think a fix that preserves this behavior could look like:
It is very easy to cause a stackoverflow from:
Intervals.jl/src/interval_sets.jl
Line 480 in a785b56
In my case I had TimeSpans because I forgot to convert them to intervals first.
I believe the intention of this code is to
collect
any iterators so we get vectors to hit the next method,Intervals.jl/src/interval_sets.jl
Line 481 in a785b56
vcat
would be used over collect but I don't think that's the problem here).However:
Any[Interval(1,2)]
won't get hit (andvcat
doesn't help).This is extra annoying on MacOS because of the longstanding Julia issue where stackoverflows don't error properly on MacOS.
The easiest fix for the stackoverflow would be to remove the first method, however that would break any code that relies on
find_intersections
doing this collecting for them. I think a fix that preserves this behavior could look like:and then defining
with what is currently in the method at
Intervals.jl/src/interval_sets.jl
Line 481 in a785b56
The text was updated successfully, but these errors were encountered: