This only happens if a script ends before playback is finished.
This isn't a real problem since you would use a blocking call or at least sd.wait() in a Python script.
But crashing the interpreter isn't really nice ...
This is an example script to reproduce the error:
import sounddevice as sd
import numpy as np
sd.play(np.zeros(100000))
Note that the crash doesn't happen every time, only occasionally.