androidx / androidx/media

How to properly ExoPlayer.release() when setVideoEffects has been called ?

Open
#2,098 2 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Feb 3, 2025.

bug needs triage
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 1.5.1

More version details

No response

Devices that reproduce the issue

Android Studio Ladybug | 2024.2.1 Patch 2
Build #AI-242.23339.11.2421.12550806, built on October 24, 2024
Runtime version: 21.0.3+-12282718-b509.11 amd64

Deployment on an AVD : Tablet, 9", 1280x720, Android 10.0 x86

Devices that do not reproduce the issue

Don't know

Reproducible in the demo app?

Yes

Reproduction steps
  1. Make demo-main work
  2. Add "implementation project(modulePrefix + 'lib-effect')" in build.gradle
  3. Add "player.setVideoEffects(Collections.emptyList());" in PlayerActivity.java, line 292, juste before player.prepare(), as indicated in setVideoEffect() javadoc
  4. Start the app and launch the first video (Clear DASH -> HD (MP4, H264))
  5. Press "Back" button
Expected result

The player should stop and the application should go back to main menu, video selection screen.

Actual result

The application crashes with the following logcat entries :

2025-02-02 17:56:03.554 11771-11786 edia3.demo.mai          androidx.media3.demo.main            I  Background concurrent copying GC freed 3522(450KB) AllocSpace objects, 1(68KB) LOS objects, 31% free, 12MB/18MB, paused 2.493ms total 171.936ms
2025-02-02 17:56:03.581 11771-11806 EGL_emulation           androidx.media3.demo.main            D  eglMakeCurrent: 0xe2c3af00: ver 2 0 (tinfo 0xe2c55ed0)
2025-02-02 17:56:03.650 11771-11806 EGL_emulation           androidx.media3.demo.main            D  eglMakeCurrent: 0xe2c3af00: ver 2 0 (tinfo 0xe2c55ed0)
2025-02-02 17:56:03.658 11771-11806 EGL_emulation           androidx.media3.demo.main            D  eglMakeCurrent: 0xe2c3af00: ver 2 0 (tinfo 0xe2c55ed0)
2025-02-02 17:56:04.071 11771-11860 EGL_emulation           androidx.media3.demo.main            D  eglMakeCurrent: 0xdab1b020: ver 2 0 (tinfo 0xc1b4eaf0)
2025-02-02 17:56:04.087 11771-11860 FinalShaderWrapper      androidx.media3.demo.main            W  Output surface and size not set, dropping frame.
2025-02-02 17:56:04.088 11771-11771 EventLogger             androidx.media3.demo.main            D  surfaceSize [eventTime=7.92, mediaPos=5.51, window=0, period=0, 0, 0]
2025-02-02 17:56:04.120 11771-11771 ExoPlayerImpl           androidx.media3.demo.main            I  Release a5d44b [AndroidXMedia3/1.5.1] [generic_x86, Android SDK built for x86, Google, 29] [media3.common, media3.database, media3.datasource.cronet, media3.datasource, media3.ui, media3.exoplayer, media3.decoder, media3.exoplayer.dash, media3.extractor, media3.effect]
2025-02-02 17:56:04.342 11771-11861 SurfaceUtils            androidx.media3.demo.main            D  disconnecting from surface 0xc329b008, reason disconnectFromSurface
2025-02-02 17:56:04.409 11771-11860 HostConnection          androidx.media3.demo.main            D  HostConnection::get() New Host Connection established 0xdab4d680, tid 11860
2025-02-02 17:56:04.409 11771-11860 HostConnection          androidx.media3.demo.main            D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 
2025-02-02 17:56:04.410 11771-11860 libEGL                  androidx.media3.demo.main            W  eglTerminate() called w/ 4 objects remaining
2025-02-02 17:56:04.411 11771-11771 ExoPlayerImplInternal   androidx.media3.demo.main            W  Ignoring messages sent after release.
2025-02-02 17:56:04.421 11771-11771 EventLogger             androidx.media3.demo.main            D  rendererReady [eventTime=8.26, mediaPos=5.55, window=0, period=0, rendererIndex=0, video, false]
2025-02-02 17:56:04.422 11771-11771 EventLogger             androidx.media3.demo.main            D  droppedFrames [eventTime=8.26, mediaPos=5.55, window=0, period=0, 18]
2025-02-02 17:56:04.423 11771-11771 EventLogger             androidx.media3.demo.main            D  videoDisabled [eventTime=8.26, mediaPos=5.55, window=0, period=0]
2025-02-02 17:56:04.423 11771-11771 EventLogger             androidx.media3.demo.main            D  rendererReady [eventTime=8.26, mediaPos=5.55, window=0, period=0, rendererIndex=1, audio, false]
2025-02-02 17:56:04.424 11771-11771 EventLogger             androidx.media3.demo.main            D  audioDisabled [eventTime=8.26, mediaPos=5.55, window=0, period=0]
2025-02-02 17:56:04.425 11771-11771 EventLogger             androidx.media3.demo.main            D  videoDecoderReleased [eventTime=8.26, mediaPos=5.55, window=0, period=0, OMX.android.goldfish.h264.decoder]
2025-02-02 17:56:04.426 11771-11771 EventLogger             androidx.media3.demo.main            D  audioDecoderReleased [eventTime=8.26, mediaPos=5.55, window=0, period=0, OMX.google.aac.decoder]
2025-02-02 17:56:05.132 11771-11806 libEGL                  androidx.media3.demo.main            E  validate_display:93 error 3001 (EGL_NOT_INITIALIZED)
2025-02-02 17:56:05.132 11771-11806 chatty                  androidx.media3.demo.main            I  uid=10148(androidx.media3.demo.main) RenderThread identical 2 lines
2025-02-02 17:56:05.138 11771-11806 libEGL                  androidx.media3.demo.main            E  validate_display:93 error 3001 (EGL_NOT_INITIALIZED)
2025-02-02 17:56:05.139 11771-11806 OpenGLRenderer          androidx.media3.demo.main            A  Encountered EGL error 12289 EGL_NOT_INITIALIZED during rendering
2025-02-02 17:56:05.139 11771-11806 libc                    androidx.media3.demo.main            A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11806 (RenderThread), pid 11771 (edia3.demo.main)
2025-02-02 17:56:05.237 11877-11877 DEBUG                   pid-11877                            A  pid: 11771, tid: 11806, name: RenderThread  >>> androidx.media3.demo.main <<<
Media

As described earlier, demo app first video : Clear DASH -> HD (MP4, H264)

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.