There is no @inbounds
present in the code.
My theory on the cause of this was that it was related to some @inbounds
that was added to DataFrames itself during the switch to returning views.
But I could not find them, in the DataFrames.jl source.
Nothing out of bounds should be being read, since it works fine if GC.gc
is called it works find and gives correct results (I think they are correct at least, could be garbage.)
The general structure of the code is
for (i, df) in enumerate(groupby(mydataframe, :n))
for foo in (1,2)
x = df[1, :n]
# other operations on `x` and `foo` that do not touch any dataframes
@show 1 # Add this to stop segufault.
end
end
(Someone came to me with this segfault, and when I found that added @show
fixed it, i was pretty WAT, and so Rory is looking at it.)