If you get an window error when entering the password, it means that your file wallet.dat is corrupted and you need to replace it from a backup.
And check the configuration of your computer.
It probably goes to sleep mode or involves a reboot with automatically updating when your wallet is running.
Excellent tip - something usually not thought of.