stopped memory out of bounds error