I found out why it was halting. It was dividing by zero occasionally. Therw was also a bug in the space vector modulation. I think everything is working now. some fine tuning is needed though.
here's a sensorless FOC test. it was on accident though. haha
sensorless field oriented control on accident:
http://youtu.be/nzueg7hna4A
heres another video. cable disconnectAC controller encoder cable disconnect test:
http://youtu.be/IXwcVGtFIGc