NordicID / nur_sdk

NUR SDK docs and libraries for various platforms
12 stars 19 forks source link

NurApi setCustomHopTable/setCustomHopTableEx null object reference #26

Open tayl opened 2 years ago

tayl commented 2 years ago

Calling NurApi.setCustomHopTable or NurApi.setCustomHopTableEx results in a null object reference, seemingly because the NurCmdCustomHop and NurCmdCustomHopEx constructors do not initialize the local mResp field. Down the line when deserializePayload is called, the field is null and the error occurs.

As a result I can not use setCustomHopTable or setCustomHopTableEx.

java.lang.NullPointerException: Attempt to write to field 'int com.nordicid.nurapi.NurCustomHopTableEx.nChan' on a null object reference at com.nordicid.nurapi.NurCmdCustomHopEx.deserializePayload(NurCmdCustomHopEx.java:64) at com.nordicid.nurapi.NurApi.runPacketHandler(NurApi.java:2903) at com.nordicid.nurapi.NurApi.access$400(NurApi.java:29) at com.nordicid.nurapi.NurApi$6.run(NurApi.java:2089) at java.lang.Thread.run(Thread.java:919)