Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Server panics if you give the wallet a type of zcashd and a bogus binary path #779

Open
rmisio opened this issue Dec 2, 2017 · 1 comment

Comments

@rmisio
Copy link
Collaborator

rmisio commented Dec 2, 2017

Observed:

  "Wallet": {
    "Binary": "/the/wheels/on/the/bus/go/round/and/round",
    "FeeAPI": "https://btc.fees.openbazaar.org",
    "HighFeeDefault": 160,
    "LowFeeDefault": 20,
    "MaxFee": 2000,
    "MediumFeeDefault": 60,
    "RPCPassword": "",
    "RPCUser": "",
    "TrustedPeer": "",
    "Type": "zcashd"
  }

results in:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4aa8e46]

goroutine 433 [running]:
github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).NextID(...)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient/infrastructure.go:168
github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).RawRequestAsync(0x0, 0x4fc1d7a, 0xd, 0x5b47710, 0x0, 0x0, 0x1)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient/rawrequest.go:45 +0x86
github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient.FutureRawResult.Receive(...)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient/rawrequest.go:77
github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).RawRequest(0x0, 0x4fc1d7a, 0xd, 0x5b47710, 0x0, 0x0, 0x5b1eb60, 0xc420103e58, 0x410d733, 0xc42028a050, ...)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/vendor/github.com/btcsuite/btcd/rpcclient/rawrequest.go:77 +0x61
github.com/OpenBazaar/openbazaar-go/bitcoin/zcashd.(*ZcashdWallet).Balance(0xc421092cf0, 0x0, 0x0)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/bitcoin/zcashd/wallet.go:213 +0x85
github.com/OpenBazaar/openbazaar-go/vendor/github.com/OpenBazaar/openbazaar-go/bitcoin.(*StatusUpdater).Start(0xc420149710)
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/vendor/github.com/OpenBazaar/openbazaar-go/bitcoin/status.go:35 +0x171
created by github.com/OpenBazaar/openbazaar-go/cmd.(*Start).Execute.func4
	/Users/rob/develop/openbazaar/v2/go/src/github.com/OpenBazaar/openbazaar-go/cmd/start.go:825 +0x83b
exit status 2

Expected:

No panic and it would be nice if the server could give some logging outlining that the wallet was unable to start with the reason.

@rmisio rmisio added the bug label Dec 2, 2017
@cpacia
Copy link
Member

cpacia commented Dec 4, 2017

This may have been using old commits. Don't think it does this normally. When I enter an invalid path it just shuts off with log fatal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants