Instead of looking for complicated troubleshooting solutions, which takes alot of time and most part dont work, and lots of pains in the a**.....DO THIS (eureka, i discovered this because my battery was dieing, and phone went off):
-unplug your device USB cable
-Swith your PHONE off
-Swith your PHONE on
- Plug it back.
Works for me every time kies goes crazy, and also works no matter what windows version you got.