mlkit icon indicating copy to clipboard operation
mlkit copied to clipboard

[Bug report] App crash on Pose Detection

Open censeon opened this issue 1 year ago • 3 comments

Hi! I am trying to evaluate the Pose Detection feature in com.google.mlkit:pose-detection-common@@18.0.0-beta3, but it crashes immediately.

It appears that most modes (Object Detection, Customer Object Detection, etc...) work as intended, with the exception of Pose Detection (and Face Mesh Detection (Beta)) which both result in an app crash (both in Java and Kotlin variants).

Monitoring Logcat, I observe the following exception:

FATAL EXCEPTION: pool-5-thread-5
Process: com.google.mlkit.vision.demo, PID: 25679
java.lang.NoSuchMethodError: No static method create(Lcom/google/mlkit/common/sdkinternal/MlKitContext;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)Lcom/google/mlkit/vision/mediapipe/MediaPipeGraphRunnerConfig; in class Lcom/google/mlkit/vision/mediapipe/MediaPipeGraphRunnerConfig; or its super classes (declaration of 'com.google.mlkit.vision.mediapipe.MediaPipeGraphRunnerConfig' appears in /data/app/~~aaejz_NkAEbxaHz9H0IakA==/com.google.mlkit.vision.demo-3c7E5tvMKkZcXfkQvAepTQ==/base.apk!classes15.dex)
	at com.google.mlkit.vision.pose.internal.zzh.load(com.google.mlkit:pose-detection-common@@18.0.0-beta3:41)
	at com.google.mlkit.common.sdkinternal.ModelResource.zza(com.google.mlkit:common@@18.10.0:4)
	at com.google.mlkit.common.sdkinternal.zzn.run(Unknown Source:10)
	at com.google.mlkit.common.sdkinternal.zzt.run(com.google.mlkit:common@@18.10.0:2)
	at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(com.google.mlkit:common@@18.10.0:4)
	at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(com.google.mlkit:common@@18.10.0:1)
	at com.google.mlkit.common.sdkinternal.zzi.run(Unknown Source:2)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(com.google.mlkit:common@@18.10.0:2)
	at com.google.mlkit.common.sdkinternal.zzk.run(Unknown Source:2)
	at java.lang.Thread.run(Thread.java:923)

To Reproduce Example Steps to reproduce the behavior in sample app:

  1. Go to 'LivePreviewActivity' or 'StillImageActivity'
  2. Click on 'Pose Detection'
  3. See error

Expected behavior No crash ; )

SDK Info:

  • com.google.mlkit:pose-detection-common@@18.0.0-beta3

Smartphone:

  • Device: Motorola Stylus (2021)
  • Simulator OS: Pixel 3a Emulator API 34
  • Samsung tablet

Thank you for your attention!

censeon avatar Feb 21 '24 16:02 censeon

I got same issue . FATAL EXCEPTION: pool-6-thread-7 Process: com.google.mlkit.vision.demo, PID: 21537 java.lang.NoSuchMethodError: No static method create(Lcom/google/mlkit/common/sdkinternal/MlKitContext;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)Lcom/google/mlkit/vision/mediapipe/MediaPipeGraphRunnerConfig; in class Lcom/google/mlkit/vision/mediapipe/MediaPipeGraphRunnerConfig; or its super classes (declaration of 'com.google.mlkit.vision.mediapipe.MediaPipeGraphRunnerConfig' appears in /data/app/~~NTN0O_i0svdmyq1V1k0Qfw==/com.google.mlkit.vision.demo-U_39TzkZBL2QMmt-zoG2gg==/base.apk!classes15.dex) at com.google.mlkit.vision.pose.internal.zzh.load(com.google.mlkit:pose-detection-common@@18.0.0-beta3:41) at com.google.mlkit.common.sdkinternal.ModelResource.zza(com.google.mlkit:common@@18.10.0:4) at com.google.mlkit.common.sdkinternal.zzn.run(Unknown Source:10) at com.google.mlkit.common.sdkinternal.zzt.run(com.google.mlkit:common@@18.10.0:2) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(com.google.mlkit:common@@18.10.0:4) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(com.google.mlkit:common@@18.10.0:1) at com.google.mlkit.common.sdkinternal.zzi.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(com.google.mlkit:common@@18.10.0:2) at com.google.mlkit.common.sdkinternal.zzk.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:923)

nirvanawoody avatar Feb 22 '24 02:02 nirvanawoody

I assume you all got this error from using the mlkit vision demo app (let me know if that is not the case).

We already update a fix for the demo app. If you get the latest version of the code, it should work.

Thanks for reporting this!

ai-plays avatar Feb 22 '24 18:02 ai-plays

I assume you all got this error from using the mlkit vision demo app (let me know if that is not the case).

We already update a fix for the demo app. If you get the latest version of the code, it should work.

Thanks for reporting this!

Hi Steven, Indeed the problem occurred in the mlkit vision app, sorry if that wasn't clear.

And wow, thanks for the fix and very fast response time, it is really much appreciated. I can confirm the fix worked by just pulling the latest version.

Thanks again and have a great day.

censeon avatar Feb 22 '24 18:02 censeon