If the FLANNIndex is closed and then used again, the code results in segmentation fault and crash of Julia.
Observed in:
OS: Ubuntu 20.04 LTS
Julia: 1.5.3
The behavior can be reproduced by
using FLANN
using Distances
X = zeros(3, 2)
t = flann(X, FLANNParameters(), Minkowski(3))
v = zeros(3)
close(t)
knn(t, v, 1)
To prevent the segfault and crash of Julia, it would be beneficial to add some check on the FLANNIndex if it has not been closed prior to passing it to Ccall to catch the misuse and return error instead of segfault.
If the FLANNIndex is closed and then used again, the code results in segmentation fault and crash of Julia.
Observed in: OS: Ubuntu 20.04 LTS Julia: 1.5.3
The behavior can be reproduced by
To prevent the segfault and crash of Julia, it would be beneficial to add some check on the FLANNIndex if it has not been closed prior to passing it to Ccall to catch the misuse and return error instead of segfault.