ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

ExoTimeoutException: Player release timed out, predominantly on AndroidTV

Open GouravSna opened this issue 3 years ago • 7 comments

ExoPlayerVersion: 2.15.1 & 2.14.0

Issue: We are getting these Timeout Exception from production users, https://github.com/google/ExoPlayer/blob/029a2b27cbdc27cf9d51d4a73ebeb503968849f6/library/core/src/main/java/com/google/android/exoplayer2/ExoTimeoutException.java#L64

When we tried reproducing this issue on FireStick (details are below) with the following steps using ExoPlayerDemo app; we saw that the video frame was not showing audio was playing. We were trying the Widevine L1 only content. Our Firestick is supporting L1.

  1. Open the content and seek back and forth multiple times and quit the player screen.
  2. You may see the Timeout exception.
  3. Interesting thing was that after that we could not play any content on the device in ExoPlayer Sample, neither in our app nor in any other 3rd party app. Everywhere the content video frame was not coming.
  4. We had to restart the device.

We don't find this issue on ExoPlayer's content. We did see this issue only on our content. If you want, we can share our content over email.

On this device, we could see this issue frequently and requires lesser tries.

Devices on which this issue found: on most of the devices, it is more than 100K.

Screenshot 2021-12-30 at 8 53 51 AM

Device Info:

device-2021-12-29-181113

Available Codecs list on Device:

D/MediaCodecInfo: Name=OMX.google.aac.decoder Type=audio/mp4a-latm MaxInstances=32
2021-12-29 17:43:19.944 17504-17504/ D/MediaCodecInfo: Name=OMX.google.amrnb.decoder Type=audio/3gpp MaxInstances=32
2021-12-29 17:43:19.944 17504-17504/ D/MediaCodecInfo: Name=OMX.google.flac.decoder Type=audio/flac MaxInstances=32
2021-12-29 17:43:19.944 17504-17504/ D/MediaCodecInfo: Name=OMX.google.g711.alaw.decoder Type=audio/g711-alaw MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.g711.mlaw.decoder Type=audio/g711-mlaw MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.mp3.decoder Type=audio/mpeg MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.opus.decoder Type=audio/opus MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.raw.decoder Type=audio/raw MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.vorbis.decoder Type=audio/vorbis MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.aac.encoder Type=audio/mp4a-latm MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.amrnb.encoder Type=audio/3gpp MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.google.flac.encoder Type=audio/flac MaxInstances=32
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.AVC Type=video/avc MaxInstances=4
2021-12-29 17:43:19.945 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.AVC.secure Type=video/avc MaxInstances=1
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.AWESOME.hdcp.secure Type=video/avc MaxInstances=1
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.google.h264.decoder Type=video/avc MaxInstances=32
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.H263 Type=video/3gpp MaxInstances=4
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.google.h263.decoder Type=video/3gpp MaxInstances=32
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.HEVC Type=video/hevc MaxInstances=4
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.HEVC.secure Type=video/hevc MaxInstances=1
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.google.hevc.decoder Type=video/hevc MaxInstances=32
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.MPEG2 Type=video/mpeg2 MaxInstances=4
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.MPEG4 Type=video/mp4v-es MaxInstances=4
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.google.mpeg4.decoder Type=video/mp4v-es MaxInstances=32
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.VPX Type=video/x-vnd.on2.vp8 MaxInstances=4
2021-12-29 17:43:19.946 17504-17504/ D/MediaCodecInfo: Name=OMX.google.vp8.decoder Type=video/x-vnd.on2.vp8 MaxInstances=32
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.VP9 Type=video/x-vnd.on2.vp9 MaxInstances=4
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.DECODER.VP9.secure Type=video/x-vnd.on2.vp9 MaxInstances=1
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.google.vp9.decoder Type=video/x-vnd.on2.vp9 MaxInstances=32
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.ENCODER.AVC Type=video/avc MaxInstances=8
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.google.h264.encoder Type=video/avc MaxInstances=32
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.google.h263.encoder Type=video/3gpp MaxInstances=32
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.MTK.VIDEO.ENCODER.HEVC Type=video/hevc MaxInstances=8
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.google.mpeg4.encoder Type=video/mp4v-es MaxInstances=32
2021-12-29 17:43:19.947 17504-17504/ D/MediaCodecInfo: Name=OMX.google.vp8.encoder Type=video/x-vnd.on2.vp8 MaxInstances=32

ExoPlayerVersion v2.15.1 logs

12-29 18:30:11.134   308   519 I PCMAudioStreamOut: calculateLatency(): downstream+proxy latency 52 ms, tuning -50 ms
12-29 18:30:11.135   308   519 I PCMAudioStreamOut: getLatency(): total latency:2 ms, tuning:-50 ms
12-29 18:30:11.135   308   519 I PCMAudioStreamOut: calculateLatency(): downstream+proxy latency 51 ms, tuning -50 ms
12-29 18:30:11.135   308   519 I PCMAudioStreamOut: getLatency(): total latency:1 ms, tuning:-50 ms
12-29 18:30:11.149   522  6060 I MediaFocusControl: abandonAudioFocus() from uid/pid 10361/9417 clientId=com.amazon.media.AmazonAudioManager@6149752com.google.android.exoplayer2.AudioFocusManager$AudioFocusListener@84b9a23
12-29 18:30:11.150  9417  9417 I ExoPlayerImpl: Release 699bc87 [ExoPlayerLib/2.15.1] [sheldon, AFTSS, Amazon, 28] [goog.exo.core, goog.exo.ui, goog.exo.flac, goog.exo.dash, goog.exo.vpx, goog.exo.opus, goog.exo.ffmpeg]
12-29 18:30:11.364   296  9559 D MTKTEEClient: [MTKTEEClient::GetHDCPCapability] Enter...
12-29 18:30:11.364   296  9559 D MTKTEEClient: [MTKTEEClient::GetHDCPCapability] Current hdcp version is 1, max hdcp version is 4
12-29 18:30:11.364   296  9559 V OEMCryptoCENC: OEMCrypto_GetHDCPCapability result = 0x0
12-29 18:30:11.658  9417  9417 E EventLogger: playerFailed [eventTime=137.04, mediaPos=1031.99, window=0, period=0, errorCode=ERROR_CODE_TIMEOUT
12-29 18:30:11.658  9417  9417 E EventLogger:   com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.ExoPlayerImpl.lambda$release$5(ExoPlayerImpl.java:858)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$eZVQ1P4AuRBXX3IBVzj-JmjEs8k.invoke(Unknown Source:2)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:261)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:170)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.util.-$$Lambda$ListenerSet$NbKDn9xtItiyMgYZmjIx_Sv1FFQ.run(Unknown Source:6)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.util.ListenerSet.flushEvents(ListenerSet.java:191)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.util.ListenerSet.sendEvent(ListenerSet.java:206)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.ExoPlayerImpl.release(ExoPlayerImpl.java:854)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.SimpleExoPlayer.release(SimpleExoPlayer.java:1674)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.demo.PlayerActivity.releasePlayer(PlayerActivity.java:358)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.demo.PlayerActivity.onStop(PlayerActivity.java:177)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1432)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.Activity.performStop(Activity.java:7409)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4202)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4180)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4255)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:192)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1824)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.os.Handler.dispatchMessage(Handler.java:106)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.os.Looper.loop(Looper.java:193)
12-29 18:30:11.658  9417  9417 E EventLogger:       at android.app.ActivityThread.main(ActivityThread.java:6740)
12-29 18:30:11.658  9417  9417 E EventLogger:       at java.lang.reflect.Method.invoke(Native Method)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
12-29 18:30:11.658  9417  9417 E EventLogger:   Caused by: com.google.android.exoplayer2.ExoTimeoutException: Player release timed out.
12-29 18:30:11.658  9417  9417 E EventLogger:       at com.google.android.exoplayer2.ExoPlayerImpl.lambda$release$5(ExoPlayerImpl.java:857)
12-29 18:30:11.658  9417  9417 E EventLogger:       ... 26 more
12-29 18:30:11.658  9417  9417 E EventLogger: ]
12-29 18:30:11.681   522   615 E WifiVendorHal: getWifiLinkLayerStats(l.937) failed {.code = ERROR_NOT_SUPPORTED, .description = }
12-29 18:30:11.693   391   391 D MtkHdmiService: MtkHdmiService::getSupportedResolutions: possibly NULL EDID: default u4res_ntsc=0x280a
12-29 18:30:11.693   391   391 I MtkHdmiService: getSuitableResolution edid==null, returning fallback value of RESOLUTION_1280X720P_59_94HZ
12-29 18:30:11.694   522  6060 W AmzDisplayModeConverter: Display.Mode cannot be mapped to auto, please use getHighestPriorityMode to get a valid id
12-29 18:30:11.699  9417  9417 I Choreographer: Skipped 33 frames!  The application may be doing too much work on its main thread.
12-29 18:30:11.704   322   322 I MTK_GRALLOC:  Successfully unref secure 11187
12-29 18:30:12.171   691  1041 W bt_btif : bta_hh_le_input_rpt_notify uuid=0x2a4d srv_handle=79 is_bl_svc_primary=1 rpt_id=1 len=3
12-29 18:30:12.172   522   605 E SELinux : avc:  denied  { see_home_task } for  scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:system_server:s0 tclass=amazon_policies permissive=0
12-29 18:30:12.172   522   605 I AmazonProfileService: Event is not filtered because it is not in filter key list.
12-29 18:30:12.173   522   605 I FireTVKeyPolicyManager: Dynamic key mapping has been enabled
12-29 18:30:12.173   522   605 I KeyMapManagerUtil: Unknown remote sku id 39. Fetch remote sku id from system property
12-29 18:30:12.173   522   605 I FireTVKeyPolicyManager: Dynamic key mapping key intercepted result 0
12-29 18:30:12.175   522   604 D AmzPhoneWindowManager: is 19 in key list = false

12-29 18:30:10.174   522   605 I KeyMapManagerUtil: Unknown remote sku id 39. Fetch remote sku id from system property
12-29 18:30:10.174   522   605 I FireTVKeyPolicyManager: Dynamic key mapping key intercepted result 0
12-29 18:30:10.176   522   604 D AmzPhoneWindowManager: is 20 in key list = false
12-29 18:30:10.364   296  9559 D MTKTEEClient: [MTKTEEClient::GetHDCPCapability] Enter...
12-29 18:30:10.364   296  9559 D MTKTEEClient: [MTKTEEClient::GetHDCPCapability] Current hdcp version is 1, max hdcp version is 4
12-29 18:30:10.364   296  9559 V OEMCryptoCENC: OEMCrypto_GetHDCPCapability result = 0x0
12-29 18:30:10.370   691  1041 W bt_btif : bta_hh_le_input_rpt_notify uuid=0x2a4d srv_handle=79 is_bl_svc_primary=1 rpt_id=1 len=3
12-29 18:30:10.371   522   605 E SELinux : avc:  denied  { see_home_task } for  scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:system_server:s0 tclass=amazon_policies permissive=0
12-29 18:30:10.372   522   605 I FireTVKeyPolicyManager: Dynamic key mapping has been enabled
12-29 18:30:10.372   522   605 I KeyMapManagerUtil: Unknown remote sku id 39. Fetch remote sku id from system property
12-29 18:30:10.372   522   605 I FireTVKeyPolicyManager: Dynamic key mapping key intercepted result 0
12-29 18:30:10.374   522   604 D AmzPhoneWindowManager: is 20 in key list = false
12-29 18:30:11.000  9417  9417 E EventLogger: playerFailed [eventTime=136.38, mediaPos=1031.99, window=0, period=0, errorCode=ERROR_CODE_TIMEOUT
12-29 18:30:11.000  9417  9417 E EventLogger:   com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.google.android.exoplayer2.SimpleExoPlayer.setVideoOutputInternal(SimpleExoPlayer.java:2014)
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.google.android.exoplayer2.SimpleExoPlayer.access$4200(SimpleExoPlayer.java:94)
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.google.android.exoplayer2.SimpleExoPlayer$ComponentListener.surfaceDestroyed(SimpleExoPlayer.java:2364)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.SurfaceView.updateSurface(SurfaceView.java:627)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:250)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.View.dispatchWindowVisibilityChanged(View.java:12868)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1784)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1464)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7199)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:961)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.Choreographer.doCallbacks(Choreographer.java:772)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.Choreographer.doFrame(Choreographer.java:706)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:947)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.os.Handler.handleCallback(Handler.java:873)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.os.Looper.loop(Looper.java:193)
12-29 18:30:11.000  9417  9417 E EventLogger:       at android.app.ActivityThread.main(ActivityThread.java:6740)
12-29 18:30:11.000  9417  9417 E EventLogger:       at java.lang.reflect.Method.invoke(Native Method)
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
12-29 18:30:11.000  9417  9417 E EventLogger:   Caused by: com.google.android.exoplayer2.ExoTimeoutException: Detaching surface timed out.
12-29 18:30:11.000  9417  9417 E EventLogger:       at com.google.android.exoplayer2.SimpleExoPlayer.setVideoOutputInternal(SimpleExoPlayer.java:2012)
12-29 18:30:11.000  9417  9417 E EventLogger:       ... 27 more
12-29 18:30:11.000  9417  9417 E EventLogger: ]
12-29 18:30:11.007  9417  9417 D EventLogger: state [eventTime=136.40, mediaPos=1031.99, window=0, period=0, IDLE]
12-29 18:30:11.038  9417  9417 D EventLogger: surfaceSize [eventTime=136.43, mediaPos=1031.99, window=0, period=0, 0, 0]
12-29 18:30:11.038   322   428 D BufferQueueProducer: About to force-disconnect API_MEDIA, mode=1
12-29 18:30:11.039   322   428 I MTK_GRALLOC:  Successfully unref secure 11172
12-29 18:30:11.039   322   428 I MTK_GRALLOC:  Successfully unref secure 11174
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11178
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11181
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11184
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11190
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11193
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11196
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11197
12-29 18:30:11.040   322   428 I MTK_GRALLOC:  Successfully unref secure 11199`

GouravSna avatar Dec 30 '21 03:12 GouravSna

This sounds like a stability issue that's likely specific your content, and possibly to certain chipsets or devices. If you could provide a snippet of JSON that we could add to media.exolist.json in our demo app to play your content there and reproduce the problem, that would help us to route it toward a team that would be best placed to take a look.

Please feel free to send this information to [email protected]. Please update this issue once you've done this, so we know to take a look. Thanks!

ojw28 avatar Jan 04 '22 18:01 ojw28

Hi @ojw28 , we have sent the media to email id. Please let us know if it does not work. It's Widevine L1 only content.

GouravSna avatar Jan 05 '22 05:01 GouravSna

@ojw28 this issue looks pretty similar to the one I reported recently as well - https://github.com/google/ExoPlayer/issues/9806. There is a link to the sample that may help to repro this issue using @GouravSna content

denis-bezrukov avatar Jan 05 '22 10:01 denis-bezrukov

Hi @ojw28 , Please let us know if there is any progress on this ticket.

GouravSna avatar Jan 31 '22 10:01 GouravSna

We are also experiencing this issue in quite a large quantity of users. Not able to pinpoint and details on what might be causing this issue but it happens when releasing the player. image image

Any updates on this?

wowonsdu avatar Apr 25 '22 12:04 wowonsdu

I'm running into the same issues. Any resolution? Thank you

akrulec avatar Aug 11 '22 00:08 akrulec

It is also happening for us on 2.18.1 when player is running and we but an Android box to standby and we stop & release Exo.

sebastiangansca avatar Aug 19 '22 13:08 sebastiangansca

Hi @christosts , Can you please take a look on this issue ?

GouravSna avatar Oct 14 '22 16:10 GouravSna

We are having the same issue, could you please update?

Asseel-Naji avatar Nov 08 '22 13:11 Asseel-Naji

We are having the same issue. any idea how to handle or fix it? should we suppress this and retry the playback after releasing the exo player?

dr-samrat avatar May 25 '23 01:05 dr-samrat

Apologies for the long delay. I'm providing a generic answer for the users that added comments besides the issue reporter who seems to be having issue with a specific content.

In general, releasing ExoPlayer blocks while until internal platform resources such as MediaCodec and AudioTrack are released. The most frequent reason why ExoPlayer.release() timeouts is because one of the platform components is stuck upon releasing. This can be either a platform problem or a device-specific issue. Before the introduction of the release timeout,ExoPlayer.release() would get stuck and the app would ANR. As discussed in #9806, if you recently upgraded your ExoPlayer version, you could be observing the timeout errors which would otherwise be ANRs in previous ExoPlayer versions.

Fixing the timeout in the player is likely not possible because, as mentioned, in most cases it's a component underneath that gets stuck and we cannot work around those easily - if at all. For instance, the library is already releasing AudioTrack on a background thread to unblock the main thread.

One thing you can try out is changing the timeout threshold. By default that's 500ms and we set this value after a period of experimentation. You could tune it on a per-device basis on your app. You can set a custom one with ExoPlayer.Builder. setReleaseTimeoutMs. It could be that for some devices going to 1000ms is good enough. Note though that as you increase the release timeout, you are increasing the probability of an ANR on your app, so if you see decreases on the timeout errors, you should compare those against any change in ANRs.

christosts avatar May 31 '23 11:05 christosts

How is ExoPlayer.Builder.setDetachSurfaceTimeoutMs fitting into all this?

skogl avatar Jun 05 '23 12:06 skogl

This sets another timeout when the output surface changes (or it gets destroyed). It should not be involved during ExoPlayer.release(), but you can experiment with that too if you see stack traces of errors coming from ExoPlayerImpl.setVideoOutputInternal(). Its default value is already relatively high, at 2 seconds.

christosts avatar Jun 07 '23 17:06 christosts