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

Android API FaceMesh inputBitmap() method crashes app #3869

Closed
heckedbyfurki opened this issue Nov 17, 2022 · 5 comments
Closed

Android API FaceMesh inputBitmap() method crashes app #3869

heckedbyfurki opened this issue Nov 17, 2022 · 5 comments
Assignees
Labels
legacy:face mesh Issues related to Face Mesh platform:android Issues with Android as Platform type:build/install For Build and Installation issues

Comments

@heckedbyfurki
Copy link

heckedbyfurki commented Nov 17, 2022

I would like to get the input image when face mesh detects someone. When I try to call inputImage() method within FaceMeshResultListener I get an (Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 1948 (Thread-10), pid 1884 (le.facemeshtest)) error.

The root of the problem is probably this (Java_com_google_mediapipe_framework_PacketGetter_nativeGetGpuBuffer+376)

System information (Please provide as much relevant information as possible)

  • I'm using example code provided by Mediapipe
  • Android Version: 10
  • Device: Xiaomi Mi9T
  • Language: Java
  • Version: Latest release
  • Solution: FaceMesh

Describe the current behavior:
App crashes

Describe the expected behavior:
I should get a bitmap

Standalone code to reproduce the issue:
Calling inputBitmap() method

Other info / Complete Logs :
Logcat log that starts from first error message to last one

18:48:34.390 A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 1948 (Thread-10), pid 1884 (le.facemeshtest)
18:48:34.446 D Created output texture: 381 width: 960 height: 1280
18:48:34.456 D Created output texture: 382 width: 960 height: 1280
18:48:34.460 I I20221117 18:48:34.459964 1956 jni_util.cc:41] GetEnv: not attached
18:48:34.485 D Created output texture: 383 width: 960 height: 1280
18:48:34.576 D Created output texture: 384 width: 960 height: 1280
18:48:34.582 I I20221117 18:48:34.582705 1952 jni_util.cc:41] GetEnv: not attached
18:48:34.603 A pid: 1884, tid: 1948, name: Thread-10 >>> com.example.facemeshtest <<<
18:48:34.610 D Created output texture: 385 width: 960 height: 1280
18:48:34.646 D Created output texture: 386 width: 960 height: 1280
18:48:34.684 D Created output texture: 387 width: 960 height: 1280
18:48:34.731 D Created output texture: 388 width: 960 height: 1280
18:48:34.766 D Created output texture: 389 width: 960 height: 1280
18:48:34.812 D Created output texture: 390 width: 960 height: 1280
18:48:34.852 D Created output texture: 391 width: 960 height: 1280
18:48:34.890 D Created output texture: 392 width: 960 height: 1280
18:48:34.935 E packageMonitor onPackageModified packageName=com.example.facemeshtest mIsRecentsWithinLauncher=true
18:48:34.935 D Created output texture: 393 width: 960 height: 1280
18:48:34.984 D Created output texture: 394 width: 960 height: 1280
18:48:35.065 D Created output texture: 395 width: 960 height: 1280
18:48:35.105 D Created output texture: 396 width: 960 height: 1280
18:48:35.153 D Created output texture: 397 width: 960 height: 1280
18:48:35.215 D Created output texture: 398 width: 960 height: 1280
18:48:35.260 D Created output texture: 399 width: 960 height: 1280
18:48:35.299 A #00 pc 000000000076d178 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.299 A #1 pc 000000000013810c /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000) (Java_com_google_mediapipe_framework_PacketGetter_nativeGetGpuBuffer+376)
18:48:35.300 A #9 pc 0000000000a8aa9e /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.framework.PacketGetter.getTextureFrame+14)
18:48:35.300 A #12 pc 0000000000a9e8e0 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.solutioncore.ImageSolutionResult.acquireInputTextureFrame+12)
18:48:35.300 A #15 pc 0000000000a9f214 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.solutioncore.SolutionGlSurfaceViewRenderer.setRenderData)
18:48:35.300 A #18 pc 0000000000a9f346 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.solutioncore.SolutionGlSurfaceView.setRenderData+6)
18:48:35.300 A #21 pc 00000000008fe340 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.example.facemeshtest.MainActivity.lambda$setupStreamingModePipeline$2$com-example-facemeshtest-MainActivity+12)
18:48:35.300 A #24 pc 00000000008fe254 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.example.facemeshtest.MainActivity$$ExternalSyntheticLambda2.run+8)
18:48:35.300 A #27 pc 0000000000a9ea98 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.solutioncore.OutputHandler.run+52)
18:48:35.300 A #30 pc 0000000000a9ebe4 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/oat/arm64/base.vdex (com.google.mediapipe.solutioncore.SolutionBase$$ExternalSyntheticLambda0.process+4)
18:48:35.300 A #41 pc 000000000012545c /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #42 pc 0000000000125688 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #43 pc 000000000073b934 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #44 pc 000000000075dfac /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #45 pc 0000000000752808 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #46 pc 00000000007523bc /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #47 pc 00000000007749e0 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)
18:48:35.300 A #48 pc 0000000000774748 /data/app/com.example.facemeshtest-E_CRl3xBiigAA8-J1eEWqQ==/base.apk (offset 0x472000)

@heckedbyfurki heckedbyfurki added the type:bug Bug in the Source Code of MediaPipe Solution label Nov 17, 2022
@Camokaliv
Copy link

Have you tried using CPU instead of GPU?

@heckedbyfurki
Copy link
Author

heckedbyfurki commented Nov 17, 2022

Yeah, nothing happens. When I set RUN_ON_GPU to false, it crashes instantly. As I see it's a bug that has still not been solved.

@sohaiberrabii
Copy link

I have encountered a similar issue on the Java solutions API. I worked around it by calling inputBitmap after setRenderData.

@heckedbyfurki
Copy link
Author

I have encountered a similar issue on the Java solutions API. I worked around it by calling inputBitmap after setRenderData.

This. You are a legend

@google-ml-butler
Copy link

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

@kuaashish kuaashish self-assigned this Nov 18, 2022
@kuaashish kuaashish added type:build/install For Build and Installation issues legacy:face mesh Issues related to Face Mesh platform:android Issues with Android as Platform and removed type:bug Bug in the Source Code of MediaPipe Solution labels Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:face mesh Issues related to Face Mesh platform:android Issues with Android as Platform type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

4 participants