Why do you have that in a loop? How many iterations through the loop do you go before crashing? Portables generally have very limited memory, so you are probably just overrunning it.