ok it seems that i got the clue. There was a bad sector on my hdd and on my primary partition (c drive) i think windows tried to access that block and got restarted or paniced. This is what i think as when i tried scandisk now it is working fine.