Hi, Sid,-fmx,
a quick thing to check is the file your working on may be slightly corrupt. If you open a new file and create something does the undo work? does it work in other files as well.
If it does and its just this file it may be worth creating a new file, and copy and pasting the contents of the corrupt file in to the new one.
It may or may not help. always worth a try.
good luck with it