DefaultFrameDroppingShaderProgram reuses a released previousTexture after end of stream, failing multi-item exports with GL 0x506
Los mantenedores suelen responder en 4 días
@claincly ya está trabajando en esto.
Desde el 10/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Version
Media3 1.10.1 (also present on main and release at the time of writing)
More version details
media3-effect / media3-transformer 1.10.1
Devices that reproduce the issue
Motorola moto g45 5G (Android 15). The bug is in GL object lifetime, so it should reproduce on any device.
Reproduction steps
- Build a
Compositionwith oneEditedMediaItemSequenceholding two or moreEditedMediaItems of the same resolution, e.g. two 90 fps clips. - Add
FrameDropEffect.createDefaultFrameDropEffect(30f)to the composition-level video effects (Composition.Builder.setEffects), so it is shared by every item in the sequence. - Export with
Transformer.
Expected result
The export completes at ~30 fps.
Actual result
The export fails as soon as the first frame of the second item reaches the effect:
androidx.media3.common.util.GlUtil$GlException: glError: 0x506 (GL_INVALID_FRAMEBUFFER_OPERATION)
at androidx.media3.effect.DefaultFrameDroppingShaderProgram.copyTextureToPreviousFrame
A single-item export, or an export whose target rate is not below the source rate (so no frames are dropped), succeeds.
Cause
DefaultFrameDroppingShaderProgram.reset(), called from signalEndOfCurrentInputStream() and flush(), releases previousTexture but never sets it to null:
private void reset() {
try {
if (previousTexture != null) {
previousTexture.release(); // GL texture + FBO deleted...
}
} ...
// ...but previousTexture still points at them
}
When the next item registers, DefaultVideoFrameProcessor.registerInputStream calls inputSwitcher.signalEndOfCurrentInputStream(). The effect chain is reused, so the next stream's first frame goes into copyTextureToPreviousFrame. There previousTexture is non-null and the same size, so the code skips re-creating it and calls GlUtil.focusFramebufferUsingCurrentContext(previousTexture.fboId, ...) on the deleted framebuffer, which raises 0x506.
Suggested fix
Set previousTexture = null; after releasing it in reset(), and in release() too for symmetry.
Workaround
A GlEffect whose program extends PassthroughShaderProgram and either forwards the input texture or drops it (getInputListener().onInputFrameProcessed(texture); getInputListener().onReadyToAcceptInputFrame()). It owns no GL objects, so nothing can go stale across streams.
Media
Not attached. The steps above reproduce it with any two clips of the same resolution.
Bug Report
- You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1k
- Merge medio
- 8 d 8 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de androidx/media
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 4 días
-
CompositionPlayer.release() leaks its playback thread and FrameProcessor when no composition was setPosiblemente ocupada @droid-girl la tomó hace 7 días. Abiertoediting preview
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
androidx/media#3506 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 4 días
-
EditedMediaItem.setFrameRate cap stops working after a slower part of a variable-speed SpeedProviderAbiertobug needs triage
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 4 días
-
Transformer: native SIGSEGV in `memcpy` while `SampleDataQueue` copies a sample into the decoder's input buffer (`DefaultCodec` has no guard like c57f96c92a)Posiblemente ocupada @droid-girl la tomó hoy. Abiertobug editing
androidx/media#3537 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 4 días
-
Noncontiguous TrueHD Atmos Streams Cause Audio Dropouts When Passed-Through to AV Receivers.Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug needs triage
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
Los mantenedores suelen responder en 4 días
Todos los issues de androidx/media
Issues similares
-
Four TestConstraintBasedAlgorithm tests pass when nothing is thrownPosiblemente ocupada @sharanggupta la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
-
bug documentation good first issue help wanted priority low size XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
martin-francois/symphony-trello#1351 ·
Los mantenedores suelen responder en 1 día
-
Add test coverage for ConvertUtil.parseDate() with NULL inputPosiblemente ocupada @mirajul-mollah7 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
eclipse-sw360/sw360#4792 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws/aws-emulator#30 · 1 comentario ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100