Try limiting the size of the cache for getPointAtLength - might need to remove it altogether to properly debug the issue, but see if this helps