Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
169 stars 124 forks source link

NPE in SendRequestSummary#getTotalAmount #831

Closed jim618 closed 8 years ago

jim618 commented 8 years ago

Error report uploaded. Id: 196f490

MultiBit HD version: 0.1.4
Operating system: 64 6.3 Windows 8.1

No user notes

Number of stack traces: 1
First stack trace:
java.lang.NullPointerException: null
    at org.multibit.hd.core.dto.SendRequestSummary.getTotalAmount(SendRequestSummary.java:118) ~[multibit-hd.jar:na]
    at org.multibit.hd.core.services.BitcoinNetworkService.completeWithoutSigning(BitcoinNetworkService.java:939) ~[multibit-hd.jar:na]
    at org.multibit.hd.core.services.BitcoinNetworkService.prepareTransaction(BitcoinNetworkService.java:767) ~[multibit-hd.jar:na]
    at org.multibit.hd.ui.views.wizards.send_bitcoin.SendBitcoinWizardModel.prepareTransaction(SendBitcoinWizardModel.java:467) ~[multibit-hd.jar:na]
    at org.multibit.hd.ui.views.wizards.send_bitcoin.SendBitcoinWizardModel.prepareWhenBIP70(SendBitcoinWizardModel.java:970) ~[multibit-hd.jar:na]
jim618 commented 8 years ago

I have added in some defensive coding against an NPE in getTotalAmount. There are various other calls to this method in BitcoinNetworkService but it's not clear the root cause of this error so I will leave that to future error reports to highlight (if it is a problem).

Awaiting review and closing.

gary-rowe commented 8 years ago

Bouncing back to trigger a second code review.

jim618 commented 8 years ago

Updated code to improve NPE hardness.

Awaiting review and closing

gary-rowe commented 8 years ago

Verified working. Closing.