mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

E/AndroidRuntime: FATAL EXCEPTION: ExternalTextureConverter

Open nicolacapece opened this issue 3 years ago • 10 comments

  • OS Platform and Distribution Linux Ubuntu 20.04,
  • Android Emulator (API 28)
  • Programming Language and version: Java

When I try to run the media pipe hand tracking app from the source code using Android Studio and the emulator, I obtain this exception:

E/AndroidRuntime: FATAL EXCEPTION: ExternalTextureConverter Process: com.google.mediapipe.apps.hands, PID: 10034 java.lang.RuntimeException: glViewport: GL error: 0x501 at com.google.mediapipe.glutil.ShaderUtil.checkGlError(ShaderUtil.java:175) at com.google.mediapipe.glutil.GlThread.bindFramebuffer(GlThread.java:117) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.updateOutputFrame(ExternalTextureConverter.java:485) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:389) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:338) at com.google.mediapipe.components.-$$Lambda$ExternalTextureConverter$RenderThread$IXJjtE68JMV2CMJNQcFYhTUqhj8.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141)

P.S. I set the RUN_ON_GPU = false as suggested from the mediapipe android documentation for the emulator. Sometimes I see the camera and hand tracking for a few seconds before crashing.

This exception happens when I start the camera, but not if I upload an image

Thank you for your support!

nicolacapece avatar Dec 02 '21 17:12 nicolacapece

Hi @nicolacapece, Did you try with any physical device and able to reproduce it. Thanks!

sgowroji avatar Dec 03 '21 04:12 sgowroji

Thank you for your answer! Yes, I tried the on the Huawei P20 and the system works correctly using the CPU. I attached an image.

However, I need to use the system on the emulator for research purposes.

nicolacapece avatar Dec 03 '21 09:12 nicolacapece

Hi @sgowroji, Do you have any solution for the Android emulator?

nicolacapece avatar Dec 06 '21 09:12 nicolacapece

Try checking the above with the latest configuration on emulator.

sgowroji avatar Jan 11 '22 14:01 sgowroji

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Jan 18 '22 15:01 google-ml-butler[bot]

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] avatar Jan 25 '22 15:01 google-ml-butler[bot]

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

google-ml-butler[bot] avatar Jan 25 '22 15:01 google-ml-butler[bot]

@nicolacapece @sgowroji

Do you have any solution for this issue? I got the same error when running on Android emulator with API < 30.

2022-06-16 00:13:39.384 15441-15626/com.example.kt_editorvideodemo E/AndroidRuntime: FATAL EXCEPTION: ExternalTextureConverter
    Process: com.example.demo, PID: 15441
    java.lang.RuntimeException: glViewport: GL error: 0x501
        at com.google.mediapipe.glutil.ShaderUtil.checkGlError(ShaderUtil.java:175)
        at com.google.mediapipe.glutil.GlThread.bindFramebuffer(GlThread.java:117)

brucechou1983 avatar Jun 15 '22 16:06 brucechou1983

@sureshdagooglecom Could you help with this issue?

brucechou1983 avatar Jul 01 '22 02:07 brucechou1983

Also looking for a resolution for this issue. Can we pls re-open this?

DavidWiener84 avatar Jul 26 '22 18:07 DavidWiener84

Hello,

I got same error on Emulator for facemesh, facedetection and hands on Android emulator with API 30. There is no error for load picture. Only for load video and start camera there is a below error. Also i got a same error on physical device.

2022-11-30 20:53:27.099 5718-5718/com.google.mediapipe.apps.facemesh E/libEGL: validate_display:87 error 3008 (EGL_BAD_DISPLAY) 2022-11-30 20:53:27.463 5718-5766/com.google.mediapipe.apps.facemesh E/EGL_emulation: eglQueryContext 32c0 EGL_BAD_ATTRIBUTE 2022-11-30 20:53:27.463 5718-5766/com.google.mediapipe.apps.facemesh E/EGL_emulation: tid 5766: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE) 2022-11-30 20:53:27.889 5718-5760/com.google.mediapipe.apps.facemesh A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c in tid 5760 (Thread-8), pid 5718 (e.apps.facemesh) 2022-11-30 20:53:28.025 5718-5766/com.google.mediapipe.apps.facemesh E/AndroidRuntime: FATAL EXCEPTION: ExternalTextureConverter Process: com.google.mediapipe.apps.facemesh, PID: 5718 java.lang.RuntimeException: glViewport: GL error: 0x501 at com.google.mediapipe.glutil.ShaderUtil.checkGlError(ShaderUtil.java:175) at com.google.mediapipe.glutil.GlThread.bindFramebuffer(GlThread.java:117) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.updateOutputFrame(ExternalTextureConverter.java:541) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:440) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:386) at com.google.mediapipe.components.-$$Lambda$ExternalTextureConverter$RenderThread$IXJjtE68JMV2CMJNQcFYhTUqhj8.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141) 2022-11-30 20:53:28.068 5718-5776/com.google.mediapipe.apps.facemesh E/BufferQueueProducer: SurfaceTexture-1-5718-0 dequeueBuffer: BufferQueue has been abandoned 2022-11-30 20:53:28.078 5718-5776/com.google.mediapipe.apps.facemesh E/BufferQueueProducer: SurfaceTexture-1-5718-0 queueBuffer: BufferQueue has been abandoned 2022-11-30 20:53:28.097 5718-5786/com.google.mediapipe.apps.facemesh E/BufferQueueProducer: SurfaceTexture-1-5718-0 queueBuffer: BufferQueue has been abandoned

tgrlhatipoglu avatar Nov 30 '22 18:11 tgrlhatipoglu

Hello @nicolacapece, We are upgrading the MediaPipe Legacy Solutions to new MediaPipe solutions However, the libraries, documentation, and source code for all the MediaPipe Legacy Solutions will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.

You can continue to use those legacy solutions in your applications if you choose. Though, we would request you to check new MediaPipe solutions which can help you more easily build and customize ML solutions for your applications. These new solutions will provide a superset of capabilities available in the legacy solutions.

kuaashish avatar Apr 24 '23 10:04 kuaashish

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] avatar May 02 '23 01:05 github-actions[bot]

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

github-actions[bot] avatar May 09 '23 01:05 github-actions[bot]

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

google-ml-butler[bot] avatar May 09 '23 01:05 google-ml-butler[bot]