Mobile-SDK-Android-V5
Mobile-SDK-Android-V5 copied to clipboard
Empty project integrated with MSDK crashes on drone connection
Hello, I'm using the empty project with the MSDK integrated given in the tutorial (https://developer.dji.com/doc/mobile-sdk-tutorial/en/quick-start/user-project-caution.html), and I get a crash when I connect the app with a drone. I got no issue when the remote controller is connected via USB, but when the drone get linked to the remote the app crashes.
It happens after the "onProductConnect" callback.
I'm running the project on a POCO F3 with Android 13.
The drone is a DJI Mini 3.
My issue looks similar to #77 but the answers provided did not help.
Error :
(co_a:34) io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | RxError{djiError=ErrorImp{errorType='CORE', errorCode='CANNOT_UPGRADE_IN_CUR_STATE', innerCode='', description='null', hint='error code = -510'}}
at io.reactivex.rxjava3.internal.observers.EmptyCompletableObserver.onError(EmptyCompletableObserver.java:50)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.onError(CompletableSubscribeOn.java:74)
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate$Emitter.tryOnError(CompletableCreate.java:91)
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate$Emitter.onError(CompletableCreate.java:77)
at dji.v5.common.utils.RxUtil$3.onFailure(RxUtil.java:2)
at dji.v5.common.utils.CallbackUtils.onFailure(CallbackUtils.java:1)
at dji.v5.manager.KeyManager$4.onFailed(KeyManager.java:3)
at dji.sdk.keyvalue.co_a.co_a(DJIKeyManager.java:28)
at dji.sdk.keyvalue.co_a$$Lambda$6.run(Unknown Source:10)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: RxError{djiError=ErrorImp{errorType='CORE', errorCode='CANNOT_UPGRADE_IN_CUR_STATE', innerCode='', description='null', hint='error code = -510'}}
at dji.v5.common.utils.RxUtil$3.onFailure(RxUtil.java:2)
at dji.v5.common.utils.CallbackUtils.onFailure(CallbackUtils.java:1)
at dji.v5.manager.KeyManager$4.onFailed(KeyManager.java:3)
at dji.sdk.keyvalue.co_a.co_a(DJIKeyManager.java:28)
at dji.sdk.keyvalue.co_a$$Lambda$6.run(Unknown Source:10)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Any help on that problem ?
Thanks !
Agent comment from yating.liao in Zendesk ticket #101979:
Could you please provide us with the crash logs? The information you provided is just the error message, but it is not the cause of the crash.
°°°
I'm not sure where I am supposed to find this information
Here's the full logcat from the moment I etablish the connection with the drone :
CameraStreamManager com.example.msdksample I (co_a:808) listenProductTypeUpdate update: DJI_MINI_3
DJIV5/Dpad...er@980bea5 com.example.msdksample I (co_a:2) init(), productType = NONE
DJIV5/co_c@aeffdb2 com.example.msdksample E (destroy:1) destroy
DJIV5/PerceptionManager com.example.msdksample E (co_a:5) updatePerceptionDelegate
lteserviceFR com.example.msdksample I (needBind:1)
DJIV5/LTES...ce@51939b8 com.example.msdksample I (co_a:9) AreCode change to:AreaCodeData{areaCode='FR', source=MCC, areaCodeEnum=FRANCE}
lteserviceFR com.example.msdksample I (needBind:1)
LTEService com.example.msdksample I (update:1) update FeatureDesc,supportArea:[CN],forbidTakeOffLteOnly:[CN],forbidGoAroundLteOnly:[CN]
LTEService com.example.msdksample I (update:1) update PrivateFeatureDesc,blockArea:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL],allowTakeOffLteOnly:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL],allowGoAroundLteOnly:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL]
DJIV5/LTES...ce@51939b8 com.example.msdksample I (l:16) 192.168.1.78 2a04:cec0:1087:f8f9:8fe4:b02a:d1e5:dd89
CameraStreamManager com.example.msdksample I (removeReceiveStreamListener:1) removeReceiveStreamListener: dji.v5.common.video.channel.VideoChannel@7c030df
CameraStreamManager com.example.msdksample I (addFrameListener:1) addFrameListener: LEFT_OR_MAIN YUV420_888 dji.v5.manager.datacenter.media.MediaManager$1$1@732f12c
GLFrameDispatcher com.example.msdksample I (<init>:13) init: dji.v5.lib.codec.opengl.co_b@a3447f5
libEGL com.example.msdksample E pre_cache appList: ,,
StreamDecoder com.example.msdksample I (<init>:5) (LEFT_OR_MAIN) created
StreamDecoder com.example.msdksample I (setCodecMimeType:5) (LEFT_OR_MAIN) setCodecMimeType: H265
StreamDecoder com.example.msdksample I (resetDecoder:1) (LEFT_OR_MAIN) resetDecoder
MediaCodecList com.example.msdksample D codecHandlesFormat: no format, so no extra checks
MediaCodecList com.example.msdksample D codecHandlesFormat: no format, so no extra checks
MediaCodecList com.example.msdksample D codecHandlesFormat: no format, so no extra checks
MediaCodec com.example.msdksample I init video box disabled for codec not supported
OMXClient com.example.msdksample I IOmx service obtained
VideoInfo com.example.msdksample D com.example.msdksample create OMX.qcom.video.decoder.hevc in MediaCodec
VideoCodec com.example.msdksample I (<init>:17) create VideoCodec: OMX.qcom.video.decoder.hevc
VideoCodec com.example.msdksample I (co_a:122) mediaFormatKeywidth
VideoCodec com.example.msdksample I (co_a:122) mediaFormatKeyheight
VideoCodec com.example.msdksample I (co_a:122) mediaFormatKeycolor-format
VideoCodec com.example.msdksample W (co_c:12) The codec may not support the color format: 2130708361
VideoCodec com.example.msdksample I (co_a:122) mediaFormatKeycolor-format
StreamDecoder com.example.msdksample I (resetDecoder:21) (LEFT_OR_MAIN) recreateDecoder: H265
GLFrameDispatcher com.example.msdksample I (<init>:7) init,161545211 format = 35, outputWidth = -1, outHeight = -1
CameraStreamManager com.example.msdksample I (co_a:874) listenPlayingBack update: LEFT_OR_MAIN false
StreamObserver com.example.msdksample I (co_a:7) (LEFT_OR_MAIN) updateStreamSource ,channelId = -1 ,linkId = -1
lteserviceFR com.example.msdksample I (needBind:1)
lteserviceFR com.example.msdksample I (needBind:1)
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) StartFirmwareBuriedDataTransfer-onFailure ErrorImp{errorType='CORE', errorCode='CANNOT_UPGRADE_IN_CUR_STATE', innerCode='', description='null', hint='error code = -510'}
DJIV5/RXUtil com.example.msdksample E (co_a:34) io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | RxError{djiError=ErrorImp{errorType='CORE', errorCode='CANNOT_UPGRADE_IN_CUR_STATE', innerCode='', description='null', hint='error code = -510'}}
at io.reactivex.rxjava3.internal.observers.EmptyCompletableObserver.onError(EmptyCompletableObserver.java:50)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.onError(CompletableSubscribeOn.java:74)
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate$Emitter.tryOnError(CompletableCreate.java:91)
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate$Emitter.onError(CompletableCreate.java:77)
at dji.v5.common.utils.RxUtil$3.onFailure(RxUtil.java:2)
at dji.v5.common.utils.CallbackUtils.onFailure(CallbackUtils.java:1)
at dji.v5.manager.KeyManager$4.onFailed(KeyManager.java:3)
at dji.sdk.keyvalue.co_a.co_a(DJIKeyManager.java:28)
at dji.sdk.keyvalue.co_a$$Lambda$6.run(Unknown Source:10)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: RxError{djiError=ErrorImp{errorType='CORE', errorCode='CANNOT_UPGRADE_IN_CUR_STATE', innerCode='', description='null', hint='error code = -510'}}
at dji.v5.common.utils.RxUtil$3.onFailure(RxUtil.java:2)
at dji.v5.common.utils.CallbackUtils.onFailure(CallbackUtils.java:1)
at dji.v5.manager.KeyManager$4.onFailed(KeyManager.java:3)
at dji.sdk.keyvalue.co_a.co_a(DJIKeyManager.java:28)
at dji.sdk.keyvalue.co_a$$Lambda$6.run(Unknown Source:10)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/LTES...ce@51939b8 com.example.msdksample I (co_b:12) set failure: false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/LTES...ce@51939b8 com.example.msdksample I (co_a:500) set failure: false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/co_a@27f19fa com.example.msdksample I (onCompleted:1) load cloud config complete {"a":{"control_lte":{"a":"control_lte","b":{"area_config_privatization":{"a":"area_config_privatization","b":"{ \"lte_feature_block_country_code\": [\"US\", \"TH\", \"RU\", \"UA\", \"IR\", \"KP\", \"SY\", \"CU\", \"IL\", \"BL\"], \"lte_only_allow_takeoff_country_code\": [\"US\", \"TH\", \"RU\", \"UA\", \"IR\", \"KP\", \"SY\", \"CU\", \"IL\", \"BL\"], \"lte_only_allow_go_around_within_3_minu_country_code\": [\"US\", \"TH\", \"RU\", \"UA\", \"IR\", \"KP\", \"SY\", \"CU\", \"IL\", \"BL\"] }"},"area_config_whitelist":{"a":"area_config_whitelist","b":"{\"lte_feature_support_country_code\":[\"CN\"],\"sdr_lost_block_motor_before_takeoff_country_code\":[\"CN\"],\"sdr_lost_block_motor_land_over_3min_country_code\":[\"CN\"]}"},"area_config_whitelist_v5_kol":{"a":"area_config_whitelist_v5_kol","b":"{\"lte_feature_support_country_code\":[\"CN\",\"AR\",\"CL\",\"PT\",\"FR\",\"GR\",\"DE\",\"IT\",\"SE\",\"TR\",\"NO\",\"CH\",\"SG\",\"AU\",\"NZ\",\"MY\",\"JP\"],\"sdr_lost_block_motor_before_takeoff_country_code\":[\"CN\"],\"sdr_lost_block_motor_land_over_3min_country_code\":[\"CN\"]}"}}}}}
DJIV5/co_a@27f19fa com.example.msdksample I (co_a:47) entry.getStringValue(): {"lte_feature_support_country_code":["CN"],"sdr_lost_block_motor_before_takeoff_country_code":["CN"],"sdr_lost_block_motor_land_over_3min_country_code":["CN"]}
DJIV5/co_a@27f19fa com.example.msdksample I (co_a:54) entry2.getStringValue(): { "lte_feature_block_country_code": ["US", "TH", "RU", "UA", "IR", "KP", "SY", "CU", "IL", "BL"], "lte_only_allow_takeoff_country_code": ["US", "TH", "RU", "UA", "IR", "KP", "SY", "CU", "IL", "BL"], "lte_only_allow_go_around_within_3_minu_country_code": ["US", "TH", "RU", "UA", "IR", "KP", "SY", "CU", "IL", "BL"] }
LTEService com.example.msdksample I (update:1) update FeatureDesc,supportArea:[CN],forbidTakeOffLteOnly:[CN],forbidGoAroundLteOnly:[CN]
LTEService com.example.msdksample I (update:1) update PrivateFeatureDesc,blockArea:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL],allowTakeOffLteOnly:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL],allowGoAroundLteOnly:[US, TH, RU, UA, IR, KP, SY, CU, IL, BL]
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/LTES...ce@51939b8 com.example.msdksample I (co_b:12) set failure: false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/RXUtil com.example.msdksample E (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
DJIV5/LTES...ce@51939b8 com.example.msdksample I (co_a:500) set failure: false ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
CrashReport com.example.msdksample I (co_c:140) Crash file save to: /storage/emulated/0/Android/data/com.example.msdksample/files/DJI/CRASH/tombstone_00001709648032699894_1441__com.example.msdksample.native.xcrash
libc com.example.msdksample A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 25463 (Thread-8), pid 25403 (mple.msdksample)
DEBUG pid-25570 A Cmdline: com.example.msdksample
DEBUG pid-25570 A pid: 25403, tid: 25463, name: Thread-8 >>> com.example.msdksample <<<
DEBUG pid-25570 A #00 pc 00000000024404b0 /data/app/~~AmKc97_-Tbrj97K9naZJCw==/com.example.msdksample-ivjAUksL9nhlOZ5QVEJw1w==/lib/arm64/libdjisdk_jni.so
ActivityManagerWrapper com.mi.android.globallauncher E getRecentTasks: mainTaskId=19266 userId=0 baseIntent=Intent { act=android.intent.action.MAIN flag=268435456 cmp=ComponentInfo{com.example.msdksample/com.example.msdksample.MainActivity} }
It says in the logs that a crash file has been saved but I couldn't find it.
If this is not sufficient to help you, could you explain to me how to get the exact crash logs ?
Thanks
Do you have any other Android devices? Does this crash only occur on a specific device?
I have found the crash log, which reads as follows: #00 pc 00000000024404b0 /data/app/~~AmKc97_-Tbrj97K9naZJCw==/com.example.msdksample-ivjAUksL9nhlOZ5QVEJw1w==/lib/arm64/libdjisdk_jni.so
This log indicates that the crash occurred within the SDK, but we are unable to determine the exact location of the crash.
I always see this same crash in my logs. I also tried to track it down and tried to handle the error myself, but nothing worked.
@terrysmay I hope this message finds you well. Could you please provide a way to consistently trigger this crash? In what scenarios does it usually occur? If you can reliably reproduce this crash, would you be able to submit the crash logs and the corresponding CSDK logs for analysis? Here is a link for uploading the files:https://pan-sec.djicorp.com/s/TRFmgC9zLEntQHg
You can find out the location where CSDK logs are stored through this article:https://sdk-forum.dji.net/hc/en-us/articles/7296380174105-How-to-export-the-logs-for-MSDK-V5
Sorry, upon further review, the unhandled exception I noted is a different case than the original poster. I will make a new issue for it, so I do not distract from this thread's topic.
Could you please provide us with the number if you have already created a new issue? @terrysmay