chaincoin-legacy / chaincoin

Chaincoin crypto currency
http://www.chaincoin.org/
Other
60 stars 22 forks source link

MasternodeList::updateMyMasternodeInfo parameter not checked #69

Closed yajiedesign closed 7 years ago

yajiedesign commented 7 years ago

the parameter infoMn is not check.when mn not run.it is null.it will be crash.

brakmic commented 7 years ago

Please be more precise. Your issue is also not very readable. Do not expect others to guess your thoughts.

Thanks!

chaincoin-legacy commented 7 years ago

It looks like it is only called when there is a masternode config:

masternodelist.cpp line 239:

BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {

... updateMyMasternodeInfo(QString::fromStdString(mne.getAlias()), QString::fromStdString(mne.getIp()), infoMn); }

yajiedesign commented 7 years ago

https://github.com/chaincoin/chaincoin/blob/master/src/qt/masternodelist.cpp#L186 infoMn some time is null.please check it.

yajiedesign commented 7 years ago

https://github.com/chaincoin/chaincoin/blob/master/src/qt/masternodelist.cpp#L247 this line CMasternode *infoMn = mnodeman.Find(txin); not always find some item.

brakmic commented 7 years ago

Could this be related to the sudden core dump we experienced after my pull request. I am only speculating here as I'm not into QT.

yajiedesign commented 7 years ago

it cause core dump.

brakmic commented 7 years ago

@yajiedesign yeah, it core dumped but your core dump could be another one. I am still speculating here. :)

brakmic commented 7 years ago

And btw. I use a masternode.conf.

chaincoin-legacy commented 7 years ago

A fix for this will follow.

chaincoin-legacy commented 7 years ago

Included in this commit

https://github.com/chaincoin/chaincoin/commit/7b8ae63c5c5e9fe73b4edb9dd1944fcfcf721f57

brakmic commented 7 years ago

I'd like to thank you @yajiedesign for helping us find this bug. 👍 ❤️

yajiedesign commented 7 years ago

ok.thanks