"Very high penalty applied"

I’m getting similar errors including StackOverflowException and “very high penalty applied” when using Alternative Path script updating the grid graph using a Graph Update Object. I’ve even reduced the Alternative Path penalty to 10 and I’m still getting the error. Is there something that I should be doing if I update the graph? Is there a way to reset penalties on the graph to zero?