Bitcoin Forum
May 10, 2024, 01:28:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: 1 2 [All]
  Print  
Author Topic: Runaway exception  (Read 2725 times)
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 11, 2017, 02:37:23 AM
 #1

"A fatal error occurred. Bitcoin can no longer continue safely and will quit."

This message comes with wallet what used to work 0.12.1. With new wallet client runs just great, but what's the deal with my old wallet?

1715304512
Hero Member
*
Offline Offline

Posts: 1715304512

View Profile Personal Message (Offline)

Ignore
1715304512
Reply with quote  #2

1715304512
Report to moderator
1715304512
Hero Member
*
Offline Offline

Posts: 1715304512

View Profile Personal Message (Offline)

Ignore
1715304512
Reply with quote  #2

1715304512
Report to moderator
1715304512
Hero Member
*
Offline Offline

Posts: 1715304512

View Profile Personal Message (Offline)

Ignore
1715304512
Reply with quote  #2

1715304512
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715304512
Hero Member
*
Offline Offline

Posts: 1715304512

View Profile Personal Message (Offline)

Ignore
1715304512
Reply with quote  #2

1715304512
Report to moderator
1715304512
Hero Member
*
Offline Offline

Posts: 1715304512

View Profile Personal Message (Offline)

Ignore
1715304512
Reply with quote  #2

1715304512
Report to moderator
kolloh
Legendary
*
Offline Offline

Activity: 1736
Merit: 1023


View Profile
January 11, 2017, 02:45:24 AM
 #2

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 11, 2017, 02:52:23 AM
 #3

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

kolloh
Legendary
*
Offline Offline

Activity: 1736
Merit: 1023


View Profile
January 11, 2017, 03:05:30 AM
 #4

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

The new version should be able to use your existing wallet file without an issue as far as I know. I'd be more concerned with getting the new wallet working with your wallet file if I were you. It should load your existing wallet by default I think. Was it not doing this?
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 11, 2017, 08:15:03 AM
 #5

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

The new version should be able to use your existing wallet file without an issue as far as I know. I'd be more concerned with getting the new wallet working with your wallet file if I were you. It should load your existing wallet by default I think. Was it not doing this?

No, using my old wallet with the coins gives runaway exception and the client won't start.

kolloh
Legendary
*
Offline Offline

Activity: 1736
Merit: 1023


View Profile
January 11, 2017, 02:35:23 PM
 #6

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

The new version should be able to use your existing wallet file without an issue as far as I know. I'd be more concerned with getting the new wallet working with your wallet file if I were you. It should load your existing wallet by default I think. Was it not doing this?

No, using my old wallet with the coins gives runaway exception and the client won't start.

You mean when using the new version of Bitcoin Core with your old wallet, you are also seeing the exception error?

First off, I would make a backup of your wallet file for safety purposes. It is possible your wallet file is corrupted and causing this error.

Then, I would try running bitcoin application with the -salvagewallet parameter via command line. This command attempts to salvage public/private keys and master encryption keys (if the wallet is encrypted) into a new wallet.dat
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 11, 2017, 04:25:58 PM
 #7

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

The new version should be able to use your existing wallet file without an issue as far as I know. I'd be more concerned with getting the new wallet working with your wallet file if I were you. It should load your existing wallet by default I think. Was it not doing this?

No, using my old wallet with the coins gives runaway exception and the client won't start.

You mean when using the new version of Bitcoin Core with your old wallet, you are also seeing the exception error?


First off, I would make a backup of your wallet file for safety purposes. It is possible your wallet file is corrupted and causing this error.

Then, I would try running bitcoin application with the -salvagewallet parameter via command line. This command attempts to salvage public/private keys and master encryption keys (if the wallet is encrypted) into a new wallet.dat

Yes, that's what i meant. Clearly I wasn't expressing myself too well.

Anyway, I've tried -salvagewallet, but it did nothing. I tried downgrading client to 0.12.1 and wallet did work (so I guess it's not corrupt), but again, after upgrading to 13.2 it results in fatal error.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
January 11, 2017, 04:27:07 PM
 #8

Yes, that's what i meant. Clearly I wasn't expressing myself too well.

Anyway, I've tried -salvagewallet, but it did nothing. I tried downgrading client to 0.12.1 and wallet did work (so I guess it's not corrupt), but again, after upgrading to 13.2 it results in fatal error.
Please post your debug.log file.

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
January 12, 2017, 10:45:21 PM
 #9

What operating system are you using? Did you recently upgrade the OS or install any updates, etc?

If the new version works, I'm not sure there is really a need to get the old one working again to be honest.
Windows 10. Bitcoin 0.12.1 was installed on this and it did work.

I think there is need to get the old one working again since it has my coins.

The new version should be able to use your existing wallet file without an issue as far as I know. I'd be more concerned with getting the new wallet working with your wallet file if I were you. It should load your existing wallet by default I think. Was it not doing this?

No, using my old wallet with the coins gives runaway exception and the client won't start.

You mean when using the new version of Bitcoin Core with your old wallet, you are also seeing the exception error?


First off, I would make a backup of your wallet file for safety purposes. It is possible your wallet file is corrupted and causing this error.

Then, I would try running bitcoin application with the -salvagewallet parameter via command line. This command attempts to salvage public/private keys and master encryption keys (if the wallet is encrypted) into a new wallet.dat

Yes, that's what i meant. Clearly I wasn't expressing myself too well.

Anyway, I've tried -salvagewallet, but it did nothing. I tried downgrading client to 0.12.1 and wallet did work (so I guess it's not corrupt), but again, after upgrading to 13.2 it results in fatal error.

Try 0.13.1 and see if that works.
There are many nodes running that or below so there couldn't have been too many bug fixes in the new release.
Otherwise, did you put 0.13.2 bitcoin core in the same place as the previous bitcoin core executable, it may just be a location issue (as in it can't find your wallet.dat file or the config file)?
Is there anything in the debug.log file after running the 0.12.2 executable that is abnormal?
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 15, 2017, 11:34:15 AM
Last edit: January 16, 2017, 09:00:11 AM by RataXes
 #10

I've tried 13.1. too. It was the first version that didn't work. Install folder (and every folder) is the same as previous versions. I don't know if 12.2 had any abnormalities. Debug.log has no entry for that version.

Edit 16th, Jan. : Works.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
January 15, 2017, 04:01:19 PM
 #11

The issue is right at the bottom:

Quote
************************
EXCEPTION: St13runtime_error       
GenerateNewHDMasterKey: AddKeyPubKey failed       
C:\Program Files\Bitcoin\bitcoin-qt.exe in Runaway exception       

2017-01-15 11:26:42 CDBEnv::EnvShutdown: Error 22 shutting down database environment: Invalid argument

This error means that Bitcoin Core was unable to write something to the wallet. So double check the permissions on the wallet.dat file inside of the datadir. Make sure that your user account is able to both read and write to the file.

RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 15, 2017, 07:08:21 PM
 #12

The issue is right at the bottom:

Quote
************************
EXCEPTION: St13runtime_error       
GenerateNewHDMasterKey: AddKeyPubKey failed       
C:\Program Files\Bitcoin\bitcoin-qt.exe in Runaway exception       

2017-01-15 11:26:42 CDBEnv::EnvShutdown: Error 22 shutting down database environment: Invalid argument

This error means that Bitcoin Core was unable to write something to the wallet. So double check the permissions on the wallet.dat file inside of the datadir. Make sure that your user account is able to both read and write to the file.

Yeah, user has all rights and running as administrator doesn't help. It can't be anything else than this current wallet because with generating new wallet client starts just fine. I just don't see what it can be. I've tried to start with -upgradewallet and -salvagewallet but those do nothing.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
January 15, 2017, 08:02:00 PM
 #13

It seems that Bitcoin Core is trying to generate a HD master key, but it should not as your wallet is not a HD wallet. Try starting Bitcoin Core with -usehd=0.

RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 15, 2017, 10:03:57 PM
 #14

It seems that Bitcoin Core is trying to generate a HD master key, but it should not as your wallet is not a HD wallet. Try starting Bitcoin Core with -usehd=0.

You were spot on with that one! Thanks a million. Had to rescan but works indeed.

Is there any advantages upgrading to HD wallet and how do I do that if that's even possible?

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
January 15, 2017, 10:43:12 PM
 #15

You were spot on with that one! Thanks a million. Had to rescan but works indeed.
No problem!

Is there any advantages upgrading to HD wallet
An HD wallet allows you to only have to backup once (if you encrypt, you have to backup again) to have all of the private keys that you will ever make. It means that you don't have to backup every 100 transactions to keep all of your private keys, although backing up regularly is a good practice anyways.

and how do I do that if that's even possible?
First you need to create a new wallet by moving your current wallet.dat file to a safe location and then starting Bitcoin Core without the -usehd option (or -usehd=1, but that is the default). Then encrypt that wallet, back it up, and get some addresses from it. Then you have to move the new wallet.dat file to a safe place and put the old wallet.dat back in. Start up Bitcoin Core with whatever you need to do to make it work, and send all of your Bitcoin to the addresses that you got from the new wallet. Once the Bitcoin is sent and confirmed, you can replace your old wallet.dat with the new one and you will be using a HD wallet.

RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
January 16, 2017, 08:58:53 AM
 #16

Well that was trivial.. thanks again.

RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
February 01, 2017, 05:37:48 AM
 #17

Well it actually wasn't trivial after all. I tried (yeah, 2 weeks later) to send money and got this:



Debug.log had entry 2 hours prior to this and it said: "The wallet is probably corrupted: Some keys decrypt but not all." I guess this has something to do with that, but what?

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
February 01, 2017, 05:41:38 AM
 #18

Well it actually wasn't trivial after all. I tried (yeah, 2 weeks later) to send money and got this:

-img snip-

Debug.log had entry 2 hours prior to this and it said: "The wallet is probably corrupted: Some keys decrypt but not all." I guess this has something to do with that, but what?
Try adding -salvagewallet to the command. You should really get your Bitcoin out of that wallet ASAP.

RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
February 01, 2017, 11:40:23 AM
 #19

Yeah I hear you. This is getting hard to handle.

Salvage didn't help, unfortunately.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
February 01, 2017, 02:02:57 PM
 #20

Yeah I hear you. This is getting hard to handle.

Salvage didn't help, unfortunately.
At this point, I don't think there is much that can be done through Core. You can use a tool like PyWallet (https://bitcointalk.org/index.php?topic=34028.0) to get as many of the private keys as you can from the wallet. Then take those private keys and import them to a new wallet. One caveat though, pywallet has not been updated in a while so it may not fully work with your wallet. You can contact the author of pywallet, JackJack (https://bitcointalk.org/index.php?action=profile;u=21053) if you need help with it as he has been more active recently.

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
February 01, 2017, 05:54:25 PM
 #21

Well it actually wasn't trivial after all. I tried (yeah, 2 weeks later) to send money and got this:



Debug.log had entry 2 hours prior to this and it said: "The wallet is probably corrupted: Some keys decrypt but not all." I guess this has something to do with that, but what?

Did you back up the wallet.dat file? (just checking as you can always decrypt it from that).
AChow is right, contact jackjack if the salvagewallet command doesn't work (he has a more powerful script).
If you can get the private keys you can then load them into another wallet and be able to use them.
RataXes (OP)
Full Member
***
Offline Offline

Activity: 287
Merit: 115


View Profile
February 03, 2017, 07:19:01 AM
 #22

Thank you both for your answers. I didn't have to go that far, I (pretty much accidentally) stumbled on uncorrupted backup so all is fine and dandy now. Phew.

Pages: 1 2 [All]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!