Author

Topic: bitcoin-Qt St13runtime_error during exit (can't open database file wallet.dat) (Read 2258 times)

newbie
Activity: 57
Merit: 0

If you have any bitcoin in your wallet, do NOT delete your wallet.dat, or you will lose your bitcoin. If you have no bitcoin yet, feel free to delete the wallet.dat file.


I have not done anything yet. Before I try the suggestions, I would like to understand a few things.

First, I have my bitcoins in my Armory Wallet. I have done the paper backup with the root key printed on it and stored it in a safe place.
If I ever lose my computer (hard disk failure) or my house burns  Shocked or whatever, with this piece of paper I can get back my wallet and the coins stored in it, right ?
Basically, with this key in my possession, if I need to create a 'new' wallet some day (on another PC), I will get the coins back from the blockchain directly... if I understand correctly, right ?  Huh

This is what is called 'cold storage', isn't it ?

hero member
Activity: 868
Merit: 1000
thanks for your help @Sonny

No problem. Smiley

Has your problem solved now?
full member
Activity: 196
Merit: 100
Shutdown bitcoin-qt

Make a copy of wallet.dat with a different name and delete the original wallet.

start bitcoin-qt again which will make a new wallet.dat, and as mentioned above all the coins in that wallet will be gone.



This is just one of the reasons you should make copies of your wallet.dat files.
newbie
Activity: 57
Merit: 0
thanks for your help @Sonny

Anyone else wants to recommend something ?

it looks like it's a more 'common problem' than I thought initially! This could scare a few beginners from bitcoins I think.
This may look trivial but at the end it's rather important, isn't it ?
hero member
Activity: 868
Merit: 1000
I have never got this problem, so I have no idea why it happens and how to fix it.

https://en.bitcoin.it/wiki/Running_Bitcoin
Code:
-salvagewallet Attempt to recover private keys from a corrupt wallet.dat

If you are using Linux, run "./bitcoin-qt -salvagewallet".
If you are using Windows, make a shortcut for your bitcoin.exe and append "-salvagewallet" to the target, and then open the program using that shortcut.

If you have any bitcoin in your wallet, do NOT delete your wallet.dat, or you will lose your bitcoin. If you have no bitcoin yet, feel free to delete the wallet.dat file.

newbie
Activity: 57
Merit: 0
Bitcoin-Qt works properly, but during exit it crashes everytime with the same error:

http://www.wavestock.com/images/bitcoin%20runaway%20exception.png

I've searched a bit the web and found this :

https://github.com/bitcoin/bitcoin/issues/2701

2 QUESTIONS :

1. Why did this happen in the first place ?
2. How do I solve this problem ? It looks like I could "Recover using -salvagewallet." => what does it mean ? How do I do this ? Is it within Bitcoin Qt that I need to do something ?

Other solutions propose to delete all the dat files, except the wallet.dat but I'm not sure if that's a good solution. This is the folders and files I see in my Bitcoin folder:

http://www.wavestock.com/images/bitcoin%20runaway%20exception2.png

Thanks for your help.

cousinHub

PS: I have my bitcoins in another Wallet in Armory but still I would like to understand what happens and clean up this error.
Jump to: