Mobile-SDK-Android icon indicating copy to clipboard operation
Mobile-SDK-Android copied to clipboard

NPE in BluetoothProductConnector

Open artem-bagritsevich opened this issue 4 years ago • 3 comments

Sometimes our app crashes because of an internal crash inside the DJI library. Seems that list of devices in BluetoothProductConnector has not been initialized from start.

Here is the crash log: 07-19 14:38:28.017 6460 6460 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at dji.sdk.sdkmanager.BluetoothProductConnector$1.onScanResultUpdate(Unknown Source:78) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at dji.midware.ble.BLE$3.onServiceConnected(Unknown Source:192) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.bluetooth.BluetoothInputDevice$2.onServiceConnected(BluetoothInputDevice.java:486) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1658) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1687) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 07-19 14:38:28.017 6460 6460 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

We are using DJI Android SDK v4.15: com.dji:dji-sdk:4.15 and com.dji:dji-sdk-provided:4.15

artem-bagritsevich avatar Aug 06 '21 12:08 artem-bagritsevich

Agent comment from DJI SDK in Zendesk ticket #51410:

尊敬的开发者,感谢您联系DJI 大疆创新 由于github不是我们主要的咨询渠道,您的问题可能跟进不及时。我们建议您通过填写表单( https://djisdksupport.zendesk.com/hc/zh-cn/requests/new )向我们反馈问题。或者您也可以在论坛发帖,与其它开发者交流。论坛链接:https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

Dear developer, thank you for contacting DJI. Since github is not our main consultation channel, your questions may not be followed up in time. We recommend that you fill in the form (https://djisdksupport.zendesk.com/hc/en-us/requests/new) to report problems to us. Or you can post in the forum to communicate with other developers. Forum link: https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

°°°

dji-dev avatar Aug 06 '21 12:08 dji-dev

Agent comment from Luce Luo in Zendesk ticket #51410:

Dear Customer,

Thank you for contacting DJI. We have handled it in the other thread, please follow up.

Thanks,

Luce Luo DJI Developer Support

°°°

dji-dev avatar Aug 09 '21 06:08 dji-dev

followed with DUSDK-13598

Michael-DJI avatar Aug 27 '21 10:08 Michael-DJI