naw no issue with vista, you have just created an endless loop... while(1) <-until killed { perform this and this wait(1); <-pause for a frame, to allow all the other functions to work and to allow the engine to render etc. }
So: insert a wait(1); at the end of the while(1) loop and it will cease to crash and start to work.