Where did the error occur? (I'm asking this, because I've asked "What is the error" twice now and got the answer to "Where did the error occur?" each time. So I'm working on the assumption that the questions "What was the error" and "Where did the error occur" are somehow transposed in your brain, and that asking the other question will get the answer I'm actually interested in.)
the error occurred when I was running this code in MARS 3.5 java based simulator
OK I give up. No idea.
I think for some reason its going in an infinite loop.... not sure though.. :S