MSDK 5.12.0 - Fatal signal 6 occurs when I start the app.
已完成Hello.
When I run the app on MSDK 5.12.0 it immediately dies.
aircraft : Matrice 4t (00.04.2003)
controller : DJI RC Plus 2 Enterprise (00.19.1601)
Thank you.
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. MSDK 5.12.0 supported Firmware Version - Matrice 4E/4T: 12.00.01.06 - DJI RC Plus 2 : 01.41.02.06 You can first upgrade the firmware versions of the aircraft and controller to the supported versions. Then try running the MSDK app again. The upgrade can be done through the flight app on the RC or by installing DJI Assistant 2 (Enterprise Series) on a computer and connecting the aircraft and controller. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
I updated the firmware, but the same error occurs.
I can't understand the cause, but here's the steps to reproduce the error.
https://github.com/dji-sdk/Mobile-SDK-Android-V5
It works when I first install the sample app. However, if I modify something (for example, add a log, change a variable name, etc.) and then rebuild, an error occurs.
Matrice 4E/4T: 12.00.0107
DJI RC Plus 2: 01.41.0208
Android Studio : Koala Feature Drop | 2024.1.2 Patch 1
Thank you. -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Thank you for your feedback.The reproduction link you provided is the SDK sample. I'm sorry, but I don't have access to the relevant drone models and RC. If the sample app can be installed and runs successfully, it proves that the MSDK version is compatible with the hardware versions of the RC and the drone. Therefore, the focus should be on the changes you made. Then, check the detailed error logs to pinpoint where it dies.You can also send the crash logs to us for joint troubleshooting. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Unfortunately, your log was not sent successfully and it was not recorded in the comments. You can first filter the error logs in Android Studio to see if there are any critical error messages. You can also describe the specific changes you made to the sample to evaluate whether the M4T does not support them. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
If I do the same test on M3t, it works.
Only happens on Matrice 4t.
The Matrice 4t I was given is a demo aircraft. Could this be the cause?
I added just one variable to the existing sample app and built it.
This is the modified part.I posted the entire log on Notion
https://chain-raver-111.notion.site/Log-18354067db9f8054b45ce94e475c4633
Thank you -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. I'm not sure if the crash of the sample run is due to your Matrice 4t being a demo aircraft. However, since you successfully ran the sample directly on this Matrice 4t demo aircraft before making any modifications, it indicates that there is no compatibility issue with the MSDK. It is likely that changes made in your Android development environment during the recompilation of the sample caused the issue. I see the following error in your log, and the crash occurs in the com.cySdkyc.clx.Helper.install method. `JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0x0` `in call to GetObjectField` `from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)` `A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11725 (mpleV5.aircraft), pid 11725 (mpleV5.aircraft)` `crash_dump64 #32 pc 000000000038a150 ``anon:dalvik-classes.dex extracted in memory from /data/app/~~ZQiTK67FDgFHD7Ln5AuRNw==/com.dji.sampleV5.aircraft-H5aR--4QoPnZn2u5kj1l2g==/base.apk] (com.cySdkyc.clx.Helper.install+60)` Solution:You can refer to the attached image and select the options in Android Studio, and clear the project cache, then rebuild and run. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. I understand that after checking that configuration in Android Studio, you need to clean the project to make the configuration take effect. You shouldn't need to clear the app cache before running the app on the RC. It might be that you have previously installed a problematic APK; you can uninstall it. In the future, after each installation, the app should run normally. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. I'm glad to receive your reply. This situation is quite strange, and we have never encountered it before. The specific reason may need to be investigated from the Android development environment. I'm glad you currently have a temporary solution. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
It's unfortunate that clearing the cache with "context?.codeCacheDir?.deleteRecursively()" is also a temporary method. This method doesn't work well either
I think the apk is not installing properly.
<When installation is successful>
<When installation is not done properly>
I tried several methods in android studio.
1. Clean Project - Rebuild Project
2. Invalidate Caches and Restart
But it doesn't work at all.
The way I find
1. Clear the cache in the RC Plus 2 Enterprise’s settings and reinstall app.
2. Delete from the code with codeCacheDir.deleteRecursively(). Sometimes this method works and sometimes it doesn't.
3. Change versionCode or versionName in build.gradle and press the Sync Now button.thank you
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Yes, using `adb install -r /path/to/your/app.apk` in the terminal is one way to fix it. Currently, my personal analysis is that a complete installation of `com.cySdkyc.clx.Helper` is required before SDK initialization. However, the installation method by clicking run button in Android Studio defaults to incremental installation, which causes the SDK initialization to fail to obtain the complete `com.cySdkyc.clx.Helper`, leading to a crash. Installing via the adb command in the terminal is a full installation, so the APK runs normally. I mentioned this configuration before (as shown in the attached image). Did you select it? You can try selecting it and then try the installation method by clicking run button again. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team
请先登录再写评论。
评论
13 条评论