Have this happening to me as well. It seem to stem from a "issue" in TFToSegment, where a calculation sometimes come VERY close to 1, causing parts of the later logic to fail with the index out of range exception
Code:
func TFToSegment() ...
float f = tf * segmentsCount; // This is the issue, sometimes f comes out as something super close to 1, like 0.9999994 (due to float precision)
int idx = (int)f; // causing idx to become 0
localF = f - idx; // localF is still 0.9999994
In my case it happens when calling TFToDistance, which causes the subcalls TFToSegment (setting localF near 1), the returned segment (probably the wrong one due to the rounding error) is used to call LocalFToDistance, again sanity checks are passed to localF being close to 1 but not 1. This ends up calling getApproximationIndexINTERNAL, which again passes sanity checks, and returns a index equal to the size of ApproximationDistances.Length, causing the exception to happen.
Wonder if most "<some float> == 1" checks would be better off replaced with Mathf.Approximately(<some float>, 1)
Edit: In our case, segmentsCount was 32, and the tf value used as input was 0.0312499981 instead of 0.3125 due to float rounding errors (which are quite common).