Skip to content

with msdk-v4.10 runtime error #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hexray-newbee opened this issue May 18, 2019 · 14 comments
Open

with msdk-v4.10 runtime error #54

hexray-newbee opened this issue May 18, 2019 · 14 comments

Comments

@hexray-newbee
Copy link

hexray-newbee commented May 18, 2019

  • Description of the issue.
    upgrade msdk to v4.10, build and run with error

  • Steps to reproduce the bug or crash issues(It would be great if you can provide this)
    D-Y-Innovations@21d09cf

  • Crash logs (If you can find it, it would be very helpful)

2019-05-18 14:15:05.358 25447-25455/? E/art: Failed sending reply to debugger: Broken pipe
2019-05-18 14:15:07.260 25447-25447/com.dji.videostreamdecodingsample E/sdk: install begin
2019-05-18 14:15:07.263 25447-25447/com.dji.videostreamdecodingsample E/sdk: v19 install
2019-05-18 14:15:07.345 25447-25447/com.dji.videostreamdecodingsample E/sdk: install begin
2019-05-18 14:15:07.346 25447-25447/com.dji.videostreamdecodingsample E/sdk: v19 install
2019-05-18 14:15:07.414 25447-25447/com.dji.videostreamdecodingsample E/linker: "/data/app/com.dji.videostreamdecodingsample-2/lib/arm64/libsfjni.so" .dynamic section has invalid link(0) sh_type: 0 (expected SHT_STRTAB)
2019-05-18 14:15:07.416 25447-25447/com.dji.videostreamdecodingsample E/sfjni: Couldn't load lib
2019-05-18 14:15:07.416 25447-25447/com.dji.videostreamdecodingsample E/art: No implementation found for void com.dji.megatronking.stringfog.StringUtilsJNI.test() (tried Java_com_dji_megatronking_stringfog_StringUtilsJNI_test and Java_com_dji_megatronking_stringfog_StringUtilsJNI_test__)
2019-05-18 14:15:07.418 25447-25447/com.dji.videostreamdecodingsample E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.dji.videostreamdecodingsample, PID: 25447
    java.lang.UnsatisfiedLinkError: No implementation found for void com.dji.megatronking.stringfog.StringUtilsJNI.test() (tried Java_com_dji_megatronking_stringfog_StringUtilsJNI_test and Java_com_dji_megatronking_stringfog_StringUtilsJNI_test__)
        at com.dji.megatronking.stringfog.StringUtilsJNI.test(Native Method)
        at com.dji.megatronking.stringfog.a.c.b(Unknown Source)
        at dji.midware.e.b(Unknown Source)
        at dji.keysdk.DJIKey.<clinit>(Unknown Source)
        at com.dji.videostreamdecodingsample.ConnectionActivity.<init>(ConnectionActivity.java:72)
        at java.lang.Class.newInstance(Native Method)
        at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2558)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6121)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
  • DJI Android SDK version you are using (Like Android SDK 3.4, etc)
    Android SDK 4.10

  • DJI Product you are using (Like Phantom 4, Mavic Pro, etc)
    P4P

  • Android system version you are using (Like Android 6.0.1, Android 5.1.1, etc)
    Android 7.1.2

  • Android device you are using (Like Samsung Galaxy Note 5, Nexus 5, etc)
    rk-3399-mid

  • Android Studio version you are using (Like Android Studio 2.2, etc)
    Android Studio 3.4

@samoilovich
Copy link

samoilovich commented May 30, 2019

I have the same issue when just ask dji sdk about something.
As an example DJISDKManager.getInstance().product
If you need more details, please let me know I will create demo app with this crash.

And this crash is not related for video stream decoding.
It happens from the start of app.

sdk version: 4.10
mobile: Sumsung S7 edge
android studio: 3.4

@Ray-DJI
Copy link

Ray-DJI commented May 30, 2019

Hi, @hxl-dy @samoilovich . DJI SDK with 4.10 have updated the secure strategies. Please add following lines in your project build.gradle
packagingOptions {

doNotStrip "*/*/libdjivideo.so"
doNotStrip "*/*/libSDKRelativeJNI.so"
doNotStrip "*/*/libFlyForbid.so"
doNotStrip "*/*/libduml_vision_bokeh.so"
doNotStrip "*/*/libyuv2.so"
doNotStrip "*/*/libGroudStation.so"
doNotStrip "*/*/libFRCorkscrew.so"
doNotStrip "*/*/libUpgradeVerify.so"
doNotStrip "*/*/libFR.so"

// Add the new so
doNotStrip "*/*/libDJIFlySafeCore.so"
doNotStrip "*/*/libdjifs_jni.so"
doNotStrip "*/*/libsfjni.so"
exclude 'META-INF/rxjava.properties'

}

Thanks for the feedback, we will update the tutorial with the SDK 4.10 as soon as possible.

@Padreco-lbr
Copy link

Padreco-lbr commented Jun 1, 2019

Same problem with me, adding these lines does not solve it.
Looks like it happens on call to DJISDKManager.getInstance().getSDKVersion()...

StackTrace:

> 2019-06-01 20:38:44.748 E/sfjni: Couldn't load lib
> 2019-06-01 20:38:44.748 E/zygote: No implementation found for void com.dji.megatronking.stringfog.StringUtilsJNI.test() (tried Java_com_dji_megatronking_stringfog_StringUtilsJNI_test and Java_com_dji_megatronking_stringfog_StringUtilsJNI_test__)
> 2019-06-01 20:38:44.748 D/AndroidRuntime: Shutting down VM
> 2019-06-01 20:38:44.753 E/AndroidRuntime: FATAL EXCEPTION: main
>     Process: com.panorama_id.codecapture, PID: 20026
>     java.lang.UnsatisfiedLinkError: No implementation found for void com.dji.megatronking.stringfog.StringUtilsJNI.test() (tried Java_com_dji_megatronking_stringfog_StringUtilsJNI_test and Java_com_dji_megatronking_stringfog_StringUtilsJNI_test__)
>         at com.dji.megatronking.stringfog.StringUtilsJNI.test(Native Method)
>         at com.dji.megatronking.stringfog.a.c.b(Unknown Source:3)
>         at dji.midware.e.b(Unknown Source:2)
>         at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:2)
>         at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)

@Michael-DJI
Copy link
Contributor

@PadreCocoRocha thanks for the feedback, could you please provide a public github repo? with that our developer could clone it and reproduce your issue.

@chano1025
Copy link

clean project -> rebuild project

@Padreco-lbr
Copy link

clean project -> rebuild project

That solved for me, thank you

@ghost
Copy link

ghost commented Jun 4, 2019

Out of curiosity: Where is that 4.10 SDK available? All the sample apps are still using 4.9.

@Ray-DJI
Copy link

Ray-DJI commented Jun 5, 2019

@accuware Our 4.10 SDK already have published for almost one month, and the VideoStreamDecodingSample have updated with the latest 4.10 SDK.

@ghost
Copy link

ghost commented Jun 5, 2019

@Ray-DJI I see. This is surprising, since I cloned the sample a week ago. I see you have updated 5 days ago...Since you also have updated the YUV part I will check it out. Thanks

@samoilovich
Copy link

@Ray-DJI
I faced one more issue. Your previous solution works! But when I tried to test release version with turned on proguard I get the crash:
Process: com.measure.groundcontrol, PID: 22027 java.lang.NoClassDefFoundError: Failed resolution of: Landroid/arch/lifecycle/LifecycleObserver; at dji.sdk.sdkmanager.DJISDKManager.getInstance

Could you help with that?

@samoilovich
Copy link

@Ray-DJI
I have added keep annotation to proguard file for android architecture component from this link
https://gist.github.com/brownsoo/9b11a823360c9cf184263df3e669375c
And it helped but I think that this moment should be fixed.
Please let me know if you need any info.

@Ray-DJI
Copy link

Ray-DJI commented Jun 10, 2019

Hi, @samoilovich You are right, the architecture component should keep from obfuscating, because our SDK AAR Package depends on the architecture component aar.
Each time when we release a new version, we will give the proguard file to tell the developer which class or method should be kept. You can refer to the DJI sample APP for more information about proguard file.

@samoilovich
Copy link

Any dji sample app?
hmmm. https://docker.pkg.github.com/DJI-Mobile-SDK-Tutorials/Android-VideoStreamDecodingSample
I tried to find here the proguard file. But could :(
Could you send a link?

@Ray-DJI
Copy link

Ray-DJI commented Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants