Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

java.lang.NullPointerException from HeartRateDataReceiver.onNewHeartRateData()

Rank

Total Posts: 4

Joined 2019-04-15

PM

I have several reports of crashes from my devices saying

Fatal Exception: java.lang.NullPointerException
Attempt to invoke interface method 'void com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc$IHeartRateDataReceiver.onNewHeartRateData(long, java.util.EnumSet, int, long, java.math.BigDecimal, com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc$DataState)' on a null object reference


According to the documentation, when I'm done needing heart rate data, doing
antPlusHeartRatePcc?.subscribeHeartRateDataEvent(null
is supposed to unregister my receiver from receiving any more heart rate data events.

Why would the AntPlusHeartRatePcc be causing a runtime error with an NPE?