-
Notifications
You must be signed in to change notification settings - Fork 574
Closed
Labels
Description
Version
Media3 pre-release (alpha, beta or RC not in this list)
More version details
1.8.0-alpha01
Devices that reproduce the issue
Reno13 5G Android 15
Galaxy S23+ Android 14
Model:Pixel 9 Pro Android 14
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Caused by androidx.media3.common.util.GlUtil$GlException: eglMakeCurrent failed
at androidx.media3.common.util.GlUtil.checkGlException(GlUtil.java:1050)
at androidx.media3.common.util.EGLSurfaceTexture.createEGLSurface(EGLSurfaceTexture.java:289)
at androidx.media3.common.util.EGLSurfaceTexture.init(EGLSurfaceTexture.java:125)
at androidx.media3.exoplayer.video.PlaceholderSurface$PlaceholderSurfaceThread.initInternal(PlaceholderSurface.java:217)
at androidx.media3.exoplayer.video.PlaceholderSurface$PlaceholderSurfaceThread.handleMessage(PlaceholderSurface.java:185)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:85)
I'm using CompositionPlayer and PlayerView. I see this crash appear in crashlytics but I'm not sure what I can do about it. I have yet to find a way to locally reproduce the issue.
Here's my code:
fun CompositionPlayerView(
state: CompositionPlayerViewState,
modifier: Modifier,
) {
val context = LocalContext.current
val player = remember(state.composition) {
val composition = state.composition
if (composition != null) {
CompositionPlayer.Builder(context)
.build()
.apply {
setComposition(composition)
prepare()
}
} else {
null
}
}
AndroidView(
factory = { ctx ->
PlayerView(ctx).apply {
this.player = player
useController = false
setEnableComposeSurfaceSyncWorkaround(true)
resizeMode = RESIZE_MODE_ZOOM
}
},
update = {
it.player = player
},
)
DisposableEffect(player) {
onDispose {
player?.pause()
player?.stop()
player?.release()
}
}
}
The composition contains one video sequence (at 0th position) and an audio sequence.
Expected result
No crash due to eglMakeCurrent failed
Actual result
eglMakeCurrent failed -> crash
Media
doesn't matter
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.