CPChain / chain

Mirror of https://bitbucket.org/cpchain/chain
GNU General Public License v3.0
51 stars 10 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #93

Closed hvredevoort closed 5 years ago

hvredevoort commented 5 years ago

Hi there, This is CPChain team. Note that this is for bug report. If you are requesting a feature, please select Feature Request template.

Where does the bug occur? chain

What is your wallet address and your balance? 0x42204cC9F4f188A21e90403DC8D21A3F1957dDBd

Describe the bug After running cpchain chain delete dpor- and cpchain chain compact (which completed successfully), I rebooted my server. After starting cpchain I got a panic error: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0xcb2112]

To Reproduce Updated to 0.4.8 sudo ./cpchain chain delete dpor- --datadir ~/cpchain/datadir sudo ./cpchain chain compact --datadir ~/cpchain/datadir rebooted server error shows on starting cpchain

./cpchain run -datadir ./datadir --unlock 0x42204cC9F4f188A21e90403DC8D21A3F1957dDBd \ --rpcaddr 127.0.0.1:8501 --port 30311 \ --mine --rpcapi personal,eth,cpc,admission,net,web3,db,txpool,miner --linenumber

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem. image

Configuration (please complete the following information):

Additional context Add any other context about the problem here. If your bug can only be reproduced occasionally, please emphasize it.

hvredevoort commented 5 years ago

I think the root cause was between a mix of files in the default ~/.cpchain directory and my custom ~/cpchain directory. After I deleted that directory, I reconfigured my server and was able to start my script with the correct parameter —datadir I am resynching everything again