2.7.12 disappearing wallets
I'm running electrum 2.7.12 on windows 7 pro From time to time, wallets containing imported private keys seems to get deleted without notice. These wallets are still shown when chosing "file -> recently opened ->" from the menu, but when chosing such a wallet, the "create a new wallet"-wizard is started instead of opening the wallet itself.
When browsing to C:\Users[my username]\AppData\Roaming\Electrum\wallets, the physical wallet file is also gone.
I have no idear on how to reproduce the error, since it only seems to happen occasionally (happened 3 or 4 times untill now)
I can only suggest to use a more recent version of Windows.
It's a company issued pc i'm afraid... So i cannot switch to windows 10 as for now. Running Linux at home, no problems there :)
Same issue, just that it happened to me every single time.
This issue was being discussed here: https://bitcointalk.org/index.php?topic=1686101
@ranochigo you mean it is reproducible? is that only with windows 7?
@ecdsa It is. Happens everytime since I created the wallet. I'll test it with Windows 8 later on a VM and let you know.
Not sure if this is related, but once I "lost" my wallet using 2.7.12 on Windows 10. I found that the wallet file was still there, but had been renamed to [original name].[random number]. I recovered it by renaming it back to the proper name.
I suspect something happened between the step of writing to a tempfile and swapping that tempfile to replace the old wallet. The logic is near storage.py line 159. This could also be improved by retaining the previous version (renamed to .bak) rather than deleting.
POSIX file systems are able to perform atomic rename. for non-POSIX systems, the logic is to delete the destination file and then to rename the temporary file.
If we add a .bak, we will end up with two files, the .tmp and the (deprecated) .bak.
My problem was solved here: https://bitcointalk.org/index.php?topic=1686101.msg17121127#msg17121127.
Seems like the space in between the word was causing this problem.
Apparently the issue was caused by using control characters (e.g. \t) in the filename. This should be solved by preventing backslashes in wallet file names.
I think this was fixed. Probably in https://github.com/spesmilo/electrum/commit/a05dab2c4dcf0ce2f69e9a4258bd3c88c818a91d