Reproducible Slicer crash on attempted tab completion, on Nightly 2020-01-08

Running the following code snippet in the python interactor (or a linked Jupyter notebook) and then typing “interp_f” and hitting the Tab key reproducibly crashes Slicer.

from scipy.interpolate import RegularGridInterpolator
import numpy as np
data_kji = np.ones((10,20,30)) #arrayFromVolume(volNode)
data_ijk = np.transpose(data_kji, axes=(2,1,0)) # reverse dimension order from kji to ijk
iLen,jLen,kLen = data_ijk.shape
iVals = list(range(iLen))
jVals = list(range(jLen))
kVals = list(range(kLen))
interp_from_ijk = RegularGridInterpolator((iVals, jVals, kVals), data_ijk)

If I don’t use Tab completion, I can use the interpolator just fine, e.g.

interp_from_ijk([[5,5,5]])

works as expected with no crash.

This crash occurs even after a clean Slicer start. It also occurs without being linked to a Jupyter kernel.

Interesting. I cannot reproduce this with latest Slicer Preview Release on Windows - auto-complete for interp_f works without any problem. Maybe you could start with a new Slicer installation, installing Python packages one by one and see which one introduces the crash.

I’ll try to remember to do this at some point in the future. At the moment, since there is an easy work-around, I am just going with that.

1 Like