irisnet / irishub

A BPoS blockchain that enables cross-chain interoperability through a unified service model -- built with Cosmos-SDK
Apache License 2.0
304 stars 127 forks source link

[p1] "invalid memory address or nil pointer" returned after submitting "SoftwareUpgrade" proposal in LCD #1726

Closed shilei-wang closed 5 years ago

shilei-wang commented 5 years ago

To Reproduce { "base_tx": { "sequence": "31", "account_number": "1", "password": "1234567890", "chain_id": "shilei-qa", "gas_adjustment": "1.2", "fee": "0.6iris", "name": "v0", "gas": "100000" }, "proposer": "faa16wzkmt87lg2uqtev7439ggjjl472vmp3f5f5rp", "version": "2", "proposal_type": "SoftwareUpgrade", "initial_deposit": "1200iris", "switch-height": "50000000", "software": "t", "title": "title", "description": "description" }

{"codespace":"sdk","code":1,"message":"recovered: runtime error: invalid memory address or nil pointer dereference
stack:
goroutine 131 [running]:
runtime/debug.Stack(0xc000980c18, 0x4cfe120, 0x5ad2db0)
/usr/local/Cellar/go/1.12.5/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/irisnet/irishub/app.(*BaseApp).runTx.func1(0xc000983a28, 0xc0009838c0, 0xc000983868)
/Users/sherlock/go/src/github.com/irishub/app/baseapp.go:742 +0x93
panic(0x4cfe120, 0x5ad2db0)
/usr/local/Cellar/go/1.12.5/libexec/src/runtime/panic.go:522 +0x1b5
github.com/irisnet/irishub/app/v1/gov.GetProposalLevel(0x0, 0x0, 0xc0000a7e70)
/Users/sherlock/go/src/github.com/irishub/app/v1/gov/govparams_util.go:35 +0x22
github.com/irisnet/irishub/app/v1/gov.Keeper.GetDepositProcedure(0x5180200, 0xc0000a7e50, 0xc00048d420, 0xc00048d420, 0x5180200, 0xc0000a7e70, 0x5180240, 0xc0000a7e80, 0xc0000d9f00, 0x3, ...)
/Users/sherlock/go/src/github.com/irishub/app/v1/gov/govparams_util.go:56 +0x1a8
github.com/irisnet/irishub/app/v1/gov.Keeper.AddInitialDeposit(0x5180200, 0xc0000a7e50, 0xc00048d420, 0xc00048d420, 0x5180200, 0xc0000a7e70, 0x5180240, 0xc0000a7e80, 0xc0000d9f00, 0x3, ...)
/Users/sherlock/go/src/github.com/irishub/app/v1/gov/keeper.go:501 +0xb5
github.com/irisnet/irishub/app/v1/gov.handleMsgSubmitProposal(0x518ee40, 0xc003dd4c90, 0xc00278dbc0, 0x1c, 0x5180200, 0xc0000a7e50, 0xc00048d420, 0xc00048d420, 0x5180200, 0xc0000a7e70, ...)
/Users/sherlock/go/src/github.com/irishub/app/v1/gov/handler.go:63 +0x4d2
github.com/irisnet/irishub/app/v1/gov.NewHandler.func1(0x518ee40, 0xc003dd4c90, 0xc00278dbc0, 0x1c, 0x5193340, 0xc0000e3960, 0x0, 0x0, 0x0, 0x0, ...)
/Users/sherlock/go/src/github.com/irishub/app/v1/gov/handler.go:21 +0x5ad
github.com/irisnet/irishub/app.(*BaseApp).runMsgs(0xc0000dad10, 0x518ee40, 0xc003dd4bd0, 0xc00278dbc0, 0x1b, 0xc0026b8650, 0x1, 0x1, 0x518ee02, 0x0, ...)
/Users/sherlock/go/src/github.com/irishub/app/baseapp.go:638 +0x1143
github.com/irisnet/irishub/app.(*BaseApp).runTx(0xc0000dad10, 0x2, 0xc001c54e00, 0xf6, 0xf6, 0x51821c0, 0xc0026e6d20, 0x0, 0x0, 0x0, ...)
/Users/sherlock/go/src/github.com/irishub/app/baseapp.go:835 +0x58f
github.com/irisnet/irishub/app.(*BaseApp).DeliverTx(0xc0000dad10, 0xc001c54e00, 0xf6, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/sherlock/go/src/github.com/irishub/app/baseapp.go:565 +0x286
github.com/tendermint/tendermint/abci/client.(*localClient).DeliverTxAsync(0xc0001eaa20, 0xc001c54e00, 0xf6, 0xf6, 0x0)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/abci/client/local_client.go:88 +0xc5
github.com/tendermint/tendermint/proxy.(*appConnConsensus).DeliverTxAsync(0xc0001e2b60, 0xc001c54e00, 0xf6, 0xf6, 0x9)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/proxy/app_conn.go:73 +0x51
github.com/tendermint/tendermint/state.execBlockOnProxyApp(0x518fa00, 0xc00096dd40, 0x519a980, 0xc0001e2b60, 0xc002d29680, 0xc0030e60f0, 0x51a30a0, 0xc0000c42c8, 0xa, 0xc0009cc7c0, ...)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/state/execution.go:275 +0x5e2
github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(0xc000be2230, 0x9, 0x1, 0xc0009cc7a0, 0xa, 0xc0009cc7c0, 0x9, 0x59aa, 0x12c, 0xc003f54760, ...)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/state/execution.go:104 +0x195
github.com/tendermint/tendermint/consensus.(*ConsensusState).finalizeCommit(0xc000495880, 0x59ab)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1305 +0x969
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryFinalizeCommit(0xc000495880, 0x59ab)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1236 +0x3e0
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit.func1(0xc000495880, 0x0, 0x59ab)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1182 +0x91
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit(0xc000495880, 0x59ab, 0x0)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1213 +0x61e
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote(0xc000495880, 0xc000e02e60, 0xc000bddd70, 0x28, 0x6260d98, 0xc000985ad8, 0xc000985b18)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1638 +0xb43
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote(0xc000495880, 0xc000e02e60, 0xc000bddd70, 0x28, 0x107, 0x107, 0x0)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:1484 +0x5c
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg(0xc000495880, 0x5171020, 0xc0000c5aa8, 0xc000bddd70, 0x28)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:663 +0x6cc
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine(0xc000495880, 0x0)
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:620 +0x65f
created by github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart
/Users/sherlock/go/pkg/mod/github.com/irisnet/tendermint@v0.22.3-0.20190621081259-2398bfb090db/consensus/state.go:306 +0x12b
"}
chengwenxi commented 5 years ago

Already fixed in https://github.com/irisnet/irishub/pull/1708

shilei-wang commented 5 years ago

confirm fixed