Are variables that used by both interrupt handler and the main loop declared volatile?
If not, look at the disassembly, I bet your whole main loop got optimized out. As far as the main loop can see OneMsTimerVal never changes. Adding more code prevents this optimization.