# Nubits wallet crashing as coins unpark

I am waiting for the wallet to sync before trying unpark. It has been stuck at block 40975 for almost an hour now (8 connections).
btw unparking is not automatic?

Yes it’s automatic. It’s done at random interval. The unpark command triggers the same process in a slightly different way so the result may help me understand what’s going on. Because I haven’t found a way to reproduce the problem yet.

OK the wallet is sync’ed. 1) I first tried with wallet with only address A. I get

[
]

from the unpark command on the console.

On the main GUI of the wallet the “parked” line still has 5. Pressing the park button of the wallet I see an empty display.

1. Then I restarted the wallet with the a wallet that has addresses A and B, disconnected from the LAN, and imported private key of address B. Then I reconnect with the internet, a few seconds later the wallet hangs. This shows that it is impossible to run unpark with a wallet that has address B while online.

2. Kill the wallet process. I unconnected the LAN, start a wallet with address A, import address B. I can see parked coins in "park’ GUI. Run unpark. The wallet immediately hangs.

Hope this helps. I can send you the keys. They have only \$5 so it’s no big deal.

Have you tried the same process with he daemon? It’s a few extra steps but I can assist through chat in trying it.

Is the following what you wanted?

1. start wallet with address A (See above post for nu.conf)

D:…\nu\daemon>nud unpark
[
]

D:…\nu\daemon>nud importprivkey xxxx…xx

D:…\nu\daemon>nud unpark

1. The wallet hangs.

xxxx…xx is the private key of address B

Maybe it is relevant: as reported here, when I parked the coins the premium I would get was less than the tx fee.

You are importing the NuBits private key into the NuShares wallet. That’s certainly the cause of the 2 problems (this one and Got unexpected NSR in my wallet).

Try importing the private key with nud -unit=B importprivkey xxx, or inside the NuBits debug console.

I realize we didn’t make the NuBits and NuShares private key different so there’s no check to prevent that. We will fix that.

That can explain the NSR. But the crash had happened before I took the suggestion and tried to import the key with nud here. So it doesn’t explain why the wallet crashes.

Anyway I have added the -unit=B option to every step in the above post and still get the same result.

new development:
After the above post I started the client with an empty B wallet, my S wallet received 5.002NSR. 5.002 is the parked amount plus premium. Why didn’t this happen before? Something has changed. Something has triggered an transaction. Might be what I did in my above post.

Then I quit the wallet and moved walletS.dat to walletS1.dat and restarted. I now have fresh B and S wallets. I import the privkey to the B wallet from the console. The wallet doesn’t crash this time. A few seconds later I receive 5.002NBT in the B wallet! This means that the S wallet and the B wallet are somehow connected.

Finally I started with the original B and S wallets. Now I have my parked NBT back. Nothing crashes. The reason of original crash, before there were no priv key funny business, is still unexplained.

@sigmike Please check your PM.

You probably still had the NuBits address in your NuShares wallet. When you imported the address into the NuBits wallet, I guess the unpark worked despite the crash. So at the next start the NuShares wallet saw the unpark transaction and believed it was its, hence the incoming 5.002 NSR. We will fix this behavior too.

I am glad it’s over although the original crash remain unexplained. Maybe it was something in the 0.3.0 wallet.

I suspect I won’t be the last person who get confused with the similar interface of NBT and NSR wallets. How about changing font and color of NSR interface. Make NSR dark background or something…

Additional visual differentiation of the wallet “sides” is a good thing, so when we start to look at the UI again in the near future, we’ll see what we can do. If anyone in the community wants to provide mockups of how they envision this differentiation, we’d be more than happy to take a look and work to incorporate it if there’s consensus that it is an improvement.

Hi guys, I have a similar problem since my coin reached the end of their parking time.

The blockchain has synced, the coins are shown as parked and after few seconds of running nu, the client crashes.
I am running the 0.4.6 version, I had the same problem also with 0.4.4, the message in the terminal is Segmentation fault (core dumped)

I haven’t spot anything unusual in the debug.log

Hi GLock,

I’m sorry to hear about your troubles. Are you running the Windows, Linux, or OSX client?

Archlinux 32 bit

Is there more info that I can provide you to help to find the source of the problem?

You could try what I have tried to make sure if you are experiencing the same problem unless the devs want your address for analysis ( because the following could cause unpark transaction therefore erase forensic evidences.)

First backup your wallets. Then unplug the network and start your client so that the client won’t crash immediately. Dump the privatekeys of the park and unpark addresses. Quit your client. Wait for 30 sec and rename your wallets to other names.

Start your client again. Now you have clean B and S wallets. Switch to Nubits wallet. In the console import the privatekey of address which you park your coins from (I called this address A). wait for the command to finish. plug in the network and wait for the client to sync. After its sync’ed, type unpark . What do you get? I got an empty [].

Then quit the client and start it with network ungplugged. Switch to Nubits wallet. In the console import the privatekey of the unpark address (address B). plug in network again. After sync’ed, type unpark. Does your client crash? My did. Now you have an wallet that only have the relevant addresses. Switch to Nushares wallet and see if you have anything there (shouldn’t. But please check).

I don’t know that to do next. What successfully unparked my coins was unpark command using the daemon. If you want to try let us know the results.

@GLock did @mhps solution work for you? If not I have some time to help troubleshoot. Let me know.

Thank you mhps and CoinGame, I will try it today or tomorrow, I will let you know what happens

mhps, I have finally had time to give it a try following the steps you have taken.

I actually had the client crash immediately after connecting to the network after this step

so I didn’t even have a chance to enter the unpark command with the network on…

I am not sure what to do next…any advice is welcome