Skip to content
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

Helper.install crashes on some arm64 devices #294

Closed
cvance opened this issue May 9, 2018 · 30 comments
Closed

Helper.install crashes on some arm64 devices #294

cvance opened this issue May 9, 2018 · 30 comments

Comments

@cvance
Copy link

cvance commented May 9, 2018

Seeing crashes on a limited number of Pixel 2 and Pixel 2 XL devices with arm64 architecture that seem to originate from Helper.install(application). Here's a stacktrace:

` *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.redacted.redacted <<<

backtrace:
#00 pc 0000000000040a90 /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/lib/arm64/libDexHelper_sdk.so
#1 pc 00000000000432f0 /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/lib/arm64/libDexHelper_sdk.so (get_hook_address(void**, void**, void**, int)+1212)
#2 pc 0000000000043aa8 /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/lib/arm64/libDexHelper_sdk.so (pBDA3C2A04D6174842141F0C74E873524+1524)
#3 pc 00000000000198b4 /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/lib/arm64/libDexHelper_sdk.so (JNI_OnLoad+10060)
#4 pc 00000000002eabbc /system/lib64/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&, _jobject*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>)+3148)
#5 pc 0000000000004118 /system/lib64/libopenjdkjvm.so (JVM_NativeLoad+416)
#6 pc 00000000000dcbc8 /system/framework/arm64/boot.oat (java.lang.Runtime.nativeLoad [DEDUPED]+200)
#7 pc 00000000001576cc /system/framework/arm64/boot.oat (java.lang.Runtime.loadLibrary0+188)
#8 pc 000000000015b340 /system/framework/arm64/boot.oat (java.lang.System.loadLibrary+96)
#9 pc 000000000055a04c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#10 pc 00000000000cef60 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread
, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#11 pc 0000000000280ae0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#12 pc 000000000027aa9c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#13 pc 000000000052abd4 /system/lib64/libart.so (MterpInvokeStatic+204)
#14 pc 000000000054c514 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#15 pc 00000000005aeb32 /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/oat/arm64/base.vdex (com.secneo.sdk.Helper.install+4)
#16 pc 0000000000254598 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.63697519+496)
#17 pc 0000000000519e28 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#18 pc 0000000000562efc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#19 pc 000000000055a04c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#20 pc 00000000000cef60 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#21 pc 0000000000280ae0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#22 pc 000000000027aa9c /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#23 pc 000000000052abd4 /system/lib64/libart.so (MterpInvokeStatic+204)
#24 pc 000000000054c514 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#25 pc 00000000003fa9ec /data/app/com.redacted.redacted-m-EgKlZGRg1S11nZGN4yAg==/oat/arm64/base.vdex (com.redacted.redacted.RedactedApplication.attachBaseContext+26)
#26 pc 0000000000254598 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.63697519+496)
#27 pc 0000000000519e28 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#28 pc 0000000000562efc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#29 pc 000000000070193c /system/framework/arm64/boot-framework.oat (android.app.Instrumentation.newApplication+156)
#30 pc 000000000070887c /system/framework/arm64/boot-framework.oat (android.app.LoadedApk.makeApplication+460)
#31 pc 00000000007cfa68 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.handleBindApplication+6568)
#32 pc 00000000007c8290 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage+6208)
#33 pc 000000000096ba34 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+180)
#34 pc 000000000096e1c8 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1128)
#35 pc 00000000007d5388 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+664)
#36 pc 000000000055a04c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#37 pc 00000000000cef60 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#38 pc 0000000000460b50 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#39 pc 00000000004625a8 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
#40 pc 00000000003f1ef8 /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
#41 pc 00000000000e66d4 /system/framework/arm64/boot.oat (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#42 pc 0000000000a2bdc8 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
#43 pc 0000000000a2fd10 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3088)
#44 pc 000000000055a04c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#45 pc 00000000000cef60 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#46 pc 0000000000460b50 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#47 pc 00000000004607a8 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+416)
#48 pc 0000000000364d44 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+644)
#49 pc 00000000000b1200 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
#50 pc 00000000000b3b08 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+760)
#51 pc 00000000000021a0 /system/bin/app_process64 (main+1200)
#52 pc 00000000000ae470 /system/lib64/libc.so (__libc_init+88) `

@JamesMasterman
Copy link

JamesMasterman commented May 11, 2018

I am seeing this kind of thing too since updating to SDK 4.5.0. I never saw it in SDK 4.3.2 that I was previously using.

I initially thought it was Android 8 related (I was only seeing it on Android 8+ devices), but now you mention it, it may be architecture related. I have a Nexus 6P here running Android 8.1 that has no issues. Main phones that I have seen crash logs for are Samsung S9, S9+, S8 and Note 8.

I also see a variety of other stack traces along the same lines, but always low level JNI/DexHelper related. Here is another common crash stack trace.

#00 pc 0000000000000000
#1 pc 00000000000415a8 /data/app/com.myapp-qEwPM5n7xFwL5B2CjdSTxg==/lib/arm64/libDexHelper_sdk.so
#2 pc 00000000000010f8 /system/lib64/libdl.so (dlsym+12)
#3 pc 0000000000018ac4 /system/lib64/libEGL.so (_ZN7android6Loader8init_apiEPvPKPKcPPFvvEPFS7_S3_E+388)
#4 pc 0000000000018784 /system/lib64/libEGL.so (_ZN7android6Loader11load_driverEPKcPNS_16egl_connection_tEj+2024)
#5 pc 0000000000017e78 /system/lib64/libEGL.so (_ZN7android6Loader4openEPNS_16egl_connection_tE+516)
#6 pc 0000000000011c4c /system/lib64/libEGL.so (_ZN7android16egl_init_driversEv+100)
#7 pc 0000000000011ed8 /system/lib64/libEGL.so (eglGetDisplay+128)
#8 pc 0000000000102274 /system/lib64/libandroid_runtime.so (_ZL24android_eglGetDisplayIntP7_JNIEnvP8_jobjecti+56)
#9 pc 0000000000d46c88 /system/framework/arm64/boot-framework.oat (android.hardware.usb.UsbDevice.native_get_device_name [DEDUPED]+152)
#10 pc 00000000010058f4 /system/framework/arm64/boot-framework.oat (android.os.-$Lambda$6x30vPJhBKUfNY8tswxuZo3DCe0.run+52)
#11 pc 00000000001fcbfc /system/framework/arm64/boot-core-oj.oat (java.lang.Thread.run+76)
#12 pc 0000000000131b84 /system/lib64/libart.so

@cvance
Copy link
Author

cvance commented May 11, 2018

I see crashes on Pixel 2 and Pixel 2 XL but we've had no issues on those same devices that we test with.

@JamesMasterman
Copy link

Interesting, thanks for the feedback. We don't have any of those to directly test on, only an S7 and it has no issues. We haven't ben able to reproduce this issue on any other device here, either (Huawei Mate 9 and 10, Oppo R7, Huawei M3 Media pad, Nexus 6P, Samsung S2 tablet, Samsung Tab A are all fine). I'm just getting this info from the Play store crash logs.

The interesting thing is when I have spoken to users with S8's they don't report any problems either, so I am wondering if the app is recovering from these or simply immediately restarting after a crash - that's listed as a "known issue" in the current release notes, although I'd almost call it a feature :-) .

@zoemcateedji
Copy link

We tried to reproduce this with the 4.5.1 sample app on a Samsung Note 8 with Android 8, as well as a Pixel 2 also running Android 8, and were unable to reproduce a crash. We were testing with a Phantom 4.
Can you give us some sample code to test with, or give us steps to use with our sample code?
Thanks!

@cvance
Copy link
Author

cvance commented May 15, 2018

@JamesMasterman upon further investigation I think this is only happening on devices running Android P Beta, I think Google Play is misreporting the crashes as happening on Oreo. I can reproduce the crash when I run my Android P emulator.

@JamesMasterman
Copy link

@zoemcateedji I wish I could, but I have been unable to replicate it on any device I have here. The only info I have is from Play Store crash logs as above.

Thanks for the update @cvance, that makes sense. I have been unable to reproduce the issues on any device or emulator I have here, but did not try the Android P beta. The Play Store always reports Android 8 as the OS version on the suspect devices, but as you say it may be a mistake.

I am also using Firebase, but it doesn't see any of these crashes, although I'm not sure if it's able to catch native crashes.

@cvance
Copy link
Author

cvance commented May 21, 2018

Will this be fixed in the next release? Its affecting a large % of our users.

@talobin
Copy link
Contributor

talobin commented Jun 19, 2018

@cvance Would this happen to a non Android P phone?
Since Android P is not stable and officially released, SDK won't support it officially either.

@cvance
Copy link
Author

cvance commented Jun 19, 2018

@talobin yes, this happens on other devices. All Xiaomi devices I think and Samsung devices running 8.0 specifically, potentially others too.

@Michael-DJI
Copy link
Contributor

@cvance based on your conversation with @JamesMasterman:
"I think Google Play is misreporting the crashes as happening on Oreo. I can reproduce the crash when I run my Android P emulator."
are you believing that it's really happened on a Android 8 device? can you reproduce it with a real Android 8 device?

@cvance
Copy link
Author

cvance commented Jun 20, 2018

@Michael-DJI Yes I believe it was happening on Samsung devices running 8.0, the misreported crashes were only on Pixel devices. Samsung s9, s8 and note8 cannot run Android P and we were getting tons of crashes pointing to
/lib/arm64/libDexHelper_sdk.so

Once we disabled the DJI sdk for those Samsung devices, we stopped getting crashes. I don't have a Samsung 8.0 but I'll see if I can find a way to reproduce it in person. However we were getting hundreds of crashes on dozens of different devices.

@Michael-DJI
Copy link
Contributor

@cvance ok, thanks for the explanation! we will try to reproduce it on a Samsung 8 device, pls continue to post your latest information about this issue, thanks again!

@cvance
Copy link
Author

cvance commented Jul 2, 2018

@Michael-DJI any news on this? We have a lot of Samsung and DJI users that would like to use the app.

@Michael-DJI
Copy link
Contributor

@cvance still, I couldn't reproduce it by myself, pls forward your issue to this email dev@dji.com, our supporting team could help to reproduce the issue, thanks!

@codeversed
Copy link

Any progress on this? Does DJI's support team know about the issue?

In preparation of Android P, I have done some digging and here is exactly what crashes: https://gist.github.com/codeversed/bb95befd127576f96b5b4ff585d7aa22

We most likely will submit a support ticket on this issue but felt I should ask the progress here first.

Thanks in advance!

@kenargo
Copy link

kenargo commented Aug 12, 2018 via email

@cvance
Copy link
Author

cvance commented Aug 13, 2018

Android Pie has officially be released and we still have to block users running P beta or Pie from using their DJI drones.

@mcorner
Copy link

mcorner commented Aug 23, 2018

Argh, just got bit by this on a Pixel running Pie. Is it fixed in the 4.7 SDK?

@dji-lisafedane
Copy link

Yes, Android Pie issues are fixed in SDK 4.7

@cvance
Copy link
Author

cvance commented Aug 23, 2018

@dji-lisafedane awesome! Any idea when 4.7 will be available on maven?

@dji-lisafedane
Copy link

dji-lisafedane commented Aug 23, 2018

@cvance It's available now

@thekameleon
Copy link

thekameleon commented Aug 26, 2018

Has this been fixed? I am seeing a similar crash with this on the X86 emulator with 4.6 and 4.7. The odd thing is it was working 3 days ago with 4.6 and it just suddenly started failing with both versions.

@Michael-DJI
Copy link
Contributor

pls check the Android Release Notes for 4.7: "On x86 devices that run Android API 23 or above, if the application is targeted with API 23 or above, FFmpeg lib might lead to runtime crashes or warnings."

@thekameleon
Copy link

I have tried this and I am still running into the same issue with the DJI UX SDK sample application when I click the "Demo On Customized Widgets" the custom UX screen loads without an issue. However when I click on the "Complete Demo of Default UI Widgets", The applications stops and I get an error message that says "Unfortunately, DJI UX Sample has stopped". This only seems to happen with the x86 emulators, the ARM emulators are fine.

Also on a side note. The release notes in the PDF file on here don't reference 4.7. Last update was 4.6.

@Michael-DJI
Copy link
Contributor

please download the release notes in following url: https://developer.dji.com/mobile-sdk/downloads/
you could report the issue in Stackoverflow using "dji-sdk" tag, it will attract more attention of our supporting team.

@mcorner
Copy link

mcorner commented Aug 27, 2018

Yes, switching to: "targetSdkVersion 22" and the 4.7 SDK fixed the crash. (Not sure if there are any other incompatibilities).

@thekameleon
Copy link

And what about getting the UX SDK sample to work with targetSdkVersion 22? It appears to only work with 24 and above without extensive re-write of the drawables

@kenargo
Copy link

kenargo commented Aug 27, 2018 via email

@thekameleon
Copy link

@Michael-DJI It would be great if your developers , support folks or any DJI employee would respond on stackoverflow. It's been crickets.

@dji-lisafedane
Copy link

@thekameleon the official DJI Developer Support channel is through emailing dev@dji.com or contact through a Pro Membership at https://developer.dji.com/

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

10 participants