gledezma
(Gledezma)
September 9, 2022, 5:14pm
1
We are working with Sentry crash report tool, since yesterday in an update we made with the Bitmovin android SDK version: 3.23.0 we are noticing some users getting onErrorCallback
with the message:
Detaching surface timed out.
Here is the message on Sentry console.
What could be happen?
Thanks in advance.
lucky.goyal
(Lucky Goyal)
September 11, 2022, 12:09pm
2
Hi @gledezma ,
Thanks for asking your query here. In general OnErrorCallback
is fired by Bitmovin player SDK when a playback error occurs. This should not result in an application crash or crash report.
Can you please share the full Stack Trace(there is option to view stack trace in the screenshot you shared) to help us understand the issue further?
gledezma
(Gledezma)
September 12, 2022, 3:42pm
3
Hi Lucky, is not a crash, we are just sending the error to our report console, but we want to know what can be the problem. Here is the stack trace.
at dalvik.system.VMStack.getThreadStackTrace(VMStack.java)
at java.lang.Thread.getStackTrace(Thread.java:1736)
at com.riivi.riivi.crashlytics.CrashlyticsSender$Companion.sendSentryMessageExternalServices(CrashlyticsSender.kt:20)
at com.riivi.riivi.ui.player.PlayerActivityInteractor.sendSentryError(PlayerActivityInteractor.kt:156)
at com.riivi.riivi.ui.player.PlayerActivityPresenter.sendSentryError(PlayerActivityPresenter.kt:368)
at com.riivi.riivi.ui.player.PlayerActivity.onErrorCallback(PlayerActivity.kt:1332)
at com.riivi.riivi.ui.player.PlayerActivity.access$onErrorCallback(PlayerActivity.kt:71)
at com.riivi.riivi.ui.player.PlayerActivity$setupPlayerListeners$6.invoke(PlayerActivity.kt:983)
at com.riivi.riivi.ui.player.PlayerActivity$setupPlayerListeners$6.invoke(PlayerActivity.kt:983)
at com.bitmovin.player.u.b.b(SourceFile:206)
at com.bitmovin.player.u.d.a(SourceFile:1)
at com.bitmovin.player.p.a.a(SourceFile:2)
at com.bitmovin.player.p.a.a(SourceFile:1)
at com.bitmovin.player.f.a0$e.b(SourceFile:7)
at com.bitmovin.player.f.a0$e.onPlayerError(SourceFile:10)
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$updatePlaybackInfo$16(ExoPlayerImpl.java:1902)
at com.google.android.exoplayer2.ExoPlayerImpl$$ExternalSyntheticLambda10.invoke
at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:281)
at com.google.android.exoplayer2.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:190)
at com.google.android.exoplayer2.util.ListenerSet$$ExternalSyntheticLambda1.run
at com.google.android.exoplayer2.util.ListenerSet.flushEvents(ListenerSet.java:211)
at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:1971)
at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:1783)
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$1$com-google-android-exoplayer2-ExoPlayerImpl(ExoPlayerImpl.java:306)
at com.google.android.exoplayer2.ExoPlayerImpl$$ExternalSyntheticLambda25.run
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
thanks @gledezma . This error Detaching surface timed out
can occur when detaching the rendering surface timeouts. The surface may be detached when closing playback, putting application in background and bringing it to foreground and application may also change the surface using setSurface API. To triage this further can you find following information.
Does this issue happen on a specific device or Android version?
Does your app set the surface explicitly using setSurface API?
Are you able to reproduce this issue in testing. If yes, can you share repro steps?
Are you using Bitmovin native SDK in a native app or as part of some framework like React native or Flutter etc.?
gledezma
(Gledezma)
September 20, 2022, 7:08pm
5
Thanks for the reply @lucky.goyal
Answering the questions:
Several devices were triggered, here are some:
No, our app does not use setSurface API explicitly on our code
No, we weren’t able to reproduce the issue, even trying to reinit the view or going background by a long time period, opening more apps to test devices and/or resources (on real and emulators). The issue actually has not appeared since Sept 10, but maybe Sentry cut us at the issue limit.
Native Android Bitmovin SDK 3.23.0, as we said on the first post.
Thanks in advance.
Hi @gledezma , thanks for answers. My last question was also about the framework in which Bitmovin native Android SDK is being used in your app. Are you using any framework like React Native or Flutter, I guess the answer is no, can you please confirm?
This issue is also reported in general for Exoplayer and is believed to related to device/firmware. Please see the related Exoplayer tickets below.
opened 08:13PM - 22 Dec 21 UTC
bug
Background:
We heavily use exoplayer in our app - we have 10+ various screens … that play a video inside. We do not use shared instance of exoplayer, so each screen may init its own player for the playback thus we very often release them (as well as underlying MediaCodecs). To catch any missed `player.release` and avoid perf regressions (e.g. playing a video in invisible fragment), we have a global debug check that no more than 2 players are in prepared state, and no more than 1 player is in playing state at the same time.
We're on a custom hardware (android 6). This device has mediatek's AVC/HEVC codecs (we have mixed content, but moving forward with hevc)
Recently we started seeing increased amount of such playback erros (we use custom 2s timeout comparing to 500ms in the library)
<details>
```
com.google.android.exoplayer2.ExoTimeoutException: Player release timed out.
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$release$5
at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$eZVQ1P4AuRBXX3IBVzj-JmjEs8k.invoke(_:0)
at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke
at com.google.android.exoplayer2.util.ListenerSet.lambda$queueEvent$0
at com.google.android.exoplayer2.util.-$$Lambda$ListenerSet$NbKDn9xtItiyMgYZmjIx_Sv1FFQ.run(_:0)
at com.google.android.exoplayer2.util.ListenerSet.flushEvents(_:191)
at com.google.android.exoplayer2.util.ListenerSet.sendEvent
at com.google.android.exoplayer2.ExoPlayerImpl.release(_:854)
at com.google.android.exoplayer2.SimpleExoPlayer.release(_:1674)
```
</details>
Sometimes it fails with timeout during detaching a surface. Probably it's related to upgrade from 2.13 to 2.15.1 (Probably, because we continue release new features related to videos, so it could be related to increased amount of `prepare` -> `release` cycles), but I didn't find anything relayted to it in the changelog / sourcecode
To reproduce it I built a screen containing 9 PlayerViews (3x3 grid) and repeatedly playback a video in these views. Each 10-120s (randomly) I restart the playback (release all the players, and recreat them again). Sometimes issue start to happen quickly, sometimes it may take a time (like 30 minutes+) to start happening.
After a few first timeouts it simply can't init a new player (with no error, but sometimes it seems it can thow smth like `MediaCodecVideoRenderer error, index=0, format=Format`), but if attempts to start a playback continues (in user case they navigate to and from the screen with player) device may enter into non-recoverable ANR (touches won't help, ANR dialog doesn't appear, only power-off may help).
I tried to minimize this reproducer and move it to exo's demo app and end up with https://github.com/denis-bezrukov/ExoPlayer/commit/cc6fb7f65e865e1a994b1f3a62aa0065797e5968 (To ensure `.release()` is called for every player this sample has counter that incremented each time player created, and decremented each time `.release()` is called. Also don't care onStop is not handled and coroutine is not cancelled - steps do not include closing this activity)
I will also submit a anr trace example to the dev.exoplayer@gmail.com
I searched through the issues, but all I found is related to DRM or Dummy Surface workaroun. Our codecs don't work nicely with Dummy surface, but overriding codecNeedsSetOutputSurfaceWorkaround (since it's custom device, it is not blacklisted in the library) to true didn't seem to help in this case and the issue is still reproducible.
I don't want to put a lot of random info here, so please let me know if I can collect any useful info that may help to track down the issue.
opened 03:25AM - 30 Dec 21 UTC
bug: device specific
bug: in platform
**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.
<img width="179" alt="Screenshot 2021-12-30 at 8 53 51 AM" src="https://user-images.githubusercontent.com/38206744/147719251-49f3a24f-3566-4aaa-9637-baae3e79a917.png">
**Device Info:**

**Available Codecs list on Device:**
```java
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**
```java
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
```
```java
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`
Can you please also check and share the percentage of impacted playback sessions to understand the severity of the issue? Additionally, it seems to happen when releasing the player which means that this may not impact playback experience. If you are using custom native UI, then you may treat this player error Detaching surface timed out
as non-fatal error and not show it to user.
We will be investigate this internally and also tracking Exoplayer tickets for any solutions.
gledezma
(Gledezma)
September 21, 2022, 12:42pm
7
Hi, @lucky.goyal
Oh sorry, my bad, but the answer is no, no frameworks, only kotlin and native android.
We tested with the newest version, we did an update and the issue seems to be reduced or maybe gone. We will be monitoring, but for now, all is ok.
Thank you very much.
Edit: impact data
From a pool of 35k users, more than 40 users got the issue.
Last check was yesterday, 6 users
gledezma
(Gledezma)
September 26, 2022, 6:23pm
8
We don’t know what fixed this issue, but is not appearing anymore.
Close this thread if you want.
Hi @gledezma , thanks for the update. Glad that the issue seems to be resolved. I believe the main change was to upgrade to latest player version. Thanks again for reporting this. This is helpful information for other community members.
Update: A fix is added since Bitmovin Android player SDK 3.30.0 to address Detaching Surface timed out
error.