google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.02k stars 5.1k forks source link

A crash on Android Samsung S24+ #5227

Closed fchen09 closed 6 months ago

fchen09 commented 6 months ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes

OS Platform and Distribution

Android 14

Mobile device if the issue happens on mobile device

Samsung S24+

Browser and version if the issue happens on browser

No response

Programming Language and version

Java

MediaPipe version

0.10.9

Bazel version

6.1

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

ndk/21.4.7075529, SDK29, Android Studio Flamingo | 2022.2.1 Patch 2

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

An ANR crash occurs on S24+, S23 Ultra, A52 5G

Describe the expected behaviour

The ANR should not occur

Standalone code/steps you may have used to try to get what you need

I compile the AAR with 
bazel build -c opt --strip=ALWAYS --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --fat_apk_cpu=arm64-v8a,armeabi-v7a --legacy_whole_archive=0 --features=-legacy_whole_archive --copt=-fvisibility=hidden --copt=-ffunction-sections --copt=-fdata-sections --copt=-fstack-protector --copt=-Oz --copt=-fomit-frame-pointer --copt=-DABSL_MIN_LOG_LEVEL=2 --linkopt=-Wl,--gc-sections,--strip-all //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar_pose:mediapipe_pose_tracking

Other info / Complete Logs

main (native):tid=1 systid=7086 
#00 pc 0x62edc libc.so (syscall + 28) (BuildId: 8ef27c227e3d72872c16395fa353f8ce)
#01 pc 0x636a70 split_config.arm64_v8a.apk (absl::lts_20230125::synchronization_internal::FutexImpl::WaitUntil + 108)
#02 pc 0x63699c split_config.arm64_v8a.apk (absl::lts_20230125::synchronization_internal::Waiter::Wait + 156)
#03 pc 0x6368c4 split_config.arm64_v8a.apk (AbslInternalPerThreadSemWait_lts_20230125 + 72)
#04 pc 0x635f2c split_config.arm64_v8a.apk (absl::lts_20230125::CondVar::WaitCommon + 176)
#05 pc 0x544e78 split_config.arm64_v8a.apk (mediapipe::GlContext::DedicatedThread::Run + 220)
#06 pc 0x5455d4 split_config.arm64_v8a.apk (mediapipe::GlContext::Run + 284)
#07 pc 0xeee50 split_config.arm64_v8a.apk (Java_com_google_mediapipe_framework_SurfaceOutput_nativeSetSurface + 148)
       at com.google.mediapipe.framework.SurfaceOutput.nativeSetSurface(Native method)
       at com.google.mediapipe.framework.SurfaceOutput.setSurface(unavailable:14)
       at com.pinosoft.pinoquest.MainActivity$3.surfaceDestroyed(unavailable:11)
       at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:2126)
       at android.view.SurfaceView.updateSurface(SurfaceView.java:1224)
       at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:439)
       at android.view.View.dispatchWindowVisibilityChanged(View.java:16628)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1634)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1634)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1634)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3930)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3291)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:11329)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1689)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1698)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1153)
       at android.view.Choreographer.doFrame(Choreographer.java:1079)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1646)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:230)
       at android.os.Looper.loop(Looper.java:319)
       at android.app.ActivityThread.main(ActivityThread.java:8918)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
kuaashish commented 6 months ago

Hi @fchen09,

Based on recent reports, it is expected that the App will not experience crashes in the upgraded versions 0.10.10 or 0.10.11. Could you kindly attempt to verify this and inform us of the outcome?

Thank you!!

fchen09 commented 6 months ago

Hi @kuaashish With v0.10.11, the error still occurs on S24+. I am not sure if it is due to a new phone with Android 14. Do you think it is resolvable? Thanks!

kuaashish commented 6 months ago

Hi @fchen09,

Following internal discussion, we recommend utilizing our prebuilt Maven package for Pose Landmarker. We regret to inform you that we are no longer maintaining the process of building the app through AAR, and our ability to assist you may be limited. We kindly ask you to inform us if you encounter similar behavior with the Maven package.

Thank you!!

github-actions[bot] commented 6 months ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 6 months ago

This issue was closed due to lack of activity after being marked stale for past 7 days.

google-ml-butler[bot] commented 6 months ago

Are you satisfied with the resolution of your issue? Yes No