12
I've been using bitcoin for over a year now without issues. It's been a while since I fired up a bitcoin client though, at least a couple months.
When I try running a bitcoin client (bitcoin-qt version 0.6.0-oneiric0) today, I get the error message
Error loading wallet.dat: Wallet corrupted
I generally use GPG to encrypt and decrypt wallet.dat, and I only have backups of the encrypted wallet.dat.gpg file. I encrypt and decrypt the file only while bitcoin is not running.
I tried following https://bitcointalk.org/index.php?topic=11331.0 . The tools appeared to work (dbdump.py --wallet doesn't throw any errors and spits out what looks like proper wallet contents), but after fixing my wallet with fixwallet.py I get the same "Wallet corrupted" error from the bitcoin client.
The bitcoin client works fine if I blow away my ~/.bitcoin directory.
I'm using 32-bit Ubuntu 11.10 desktop.
I also tried installing the latest bitcoin Qt client on Windows, but that also reports wallet.dat is corrupted.
I tried using a Linux binary from bitcoin.org, and I get this error message:
************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in Runaway exception
terminate called after throwing an instance of 'DbRunRecoveryException'
what(): DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
Aborted
This may be related: https://github.com/bitcoin/bitcoin/issues/809
Update Mon, 30 Apr 2012 21:45:00 -0700
I ended up trying a bunch of older versions of the bitcoin client, and version 0.3.24-beta reads the wallet just fine! What the heck!?! Gotta be a bug in bitcoin. Now I just need to figure out a way to safely "upgrade" my wallet so it works with 0.6, I guess.
Update Mon, 30 Apr 2012 22:00:00 -0700
Bitcoin 0.4.1 is able to work with everything in my ~/.bitcoin dir. 0.5.4rc3 and 0.6.0 do not work.
Is there some way to serialize the wallet data as plain text? Man, I hate BerkeleyDB.
Update Wed, 02 May 2012 10:43:19 -0700
Using Bitcoin 0.4.1 with my old wallet (which apparently contains something corrupt), I was able to transfer my balance to a new wallet created from scratch with Bitcoin 0.6.0.
Why do you say it is the wallet itself that is giving the error?
Try using just wallet.dat and, for troubleshooting, a copy of the blockchain. http://eu1.bitcoincharts.com/blockchain
@StephenGornick: I've tried starting bitcoin with only wallet.dat in
~/.bitcoin/and I still getError loading wallet.dat: Wallet corrupted. Would it help to try the same thing but with a blockchain downloaded from the link you specified? – Adam Monsen – 2012-04-30T18:54:44.063Having a copy of the blockchain won't help, no. If you get an error message with no blockchain, you'll get the same error after downloading the blockchain. – Chris Moore – 2012-04-30T23:01:41.167
Thanks for going to the effort of documenting what you did to fix the problem – Highly Irregular – 2012-05-02T22:23:43.670
I had the same issue but didn't want to go through the trouble of downgrading, create new wallet, upgrade.. So instead I tried to delete everything except for the 'wallet.dat' file. This worked. Although now it has to reprocess all transactions from start – mikabytes – 2012-08-07T09:00:46.850