DefaultFrameDroppingShaderProgram reuses a released previousTexture after end of stream, failing multi-item exports with GL 0x506
Maintainer thường phản hồi trong vòng 4 ngày
@claincly đang làm issue này rồi.
Từ ngày 10/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1k
- Merge trung bình
- 8 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của androidx/media
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
CompositionPlayer.release() leaks its playback thread and FrameProcessor when no composition was setCó thể đã có người làm @droid-girl đã nhận 7 ngày trước. Đang mởediting preview
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
androidx/media#3506 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 4 ngày
-
EditedMediaItem.setFrameRate cap stops working after a slower part of a variable-speed SpeedProviderĐang mởbug needs triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Transformer: native SIGSEGV in `memcpy` while `SampleDataQueue` copies a sample into the decoder's input buffer (`DefaultCodec` has no guard like c57f96c92a)Có thể đã có người làm @droid-girl đã nhận hôm nay. Đang mởbug editing
androidx/media#3537 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Noncontiguous TrueHD Atmos Streams Cause Audio Dropouts When Passed-Through to AV Receivers.Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug needs triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của androidx/media
Issue tương tự
-
Enhancing the Issue TemplateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
SasanLabs/VulnerableApp#912 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
desktop edt not responding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
datafusion-contrib/StreamFusion#653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Absolute row/column index 0 is ignored for images, hyperlinks and commentsCó thể đã có người làm @fanOfSunny đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày