Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Playback stuck buffering and not loading" error #10361

Closed
VeiZhang opened this issue Jun 21, 2022 · 9 comments
Closed

"Playback stuck buffering and not loading" error #10361

VeiZhang opened this issue Jun 21, 2022 · 9 comments
Assignees

Comments

@VeiZhang
Copy link

VeiZhang commented Jun 21, 2022

When filing a question:

Describe your question in detail.

In case your question refers to a problem you are seeing in your app:

  • Output of running $ adb bugreport in the console
10:29:15.186 ActivityThread           W  handleWindowVisibility: no activity for token android.os.BinderProxy@1026f57
10:29:15.490 ExoPlayerImpl            I  Init 9555e46 [ExoPlayerLib/2.18.0] [franklin, Q3, Droidlogic, 28]
10:29:15.492 DefaultRenderersFactory  I  Loaded LibvpxVideoRenderer.
10:29:15.492                          I  Loaded Libgav1VideoRenderer.
10:29:15.498                          I  Loaded LibopusAudioRenderer.
10:29:15.498                          I  Loaded LibflacAudioRenderer.
10:29:15.498                          I  Loaded FfmpegAudioRenderer.
10:29:15.516 EventLogger              D  playWhenReady [eventTime=0.00, mediaPos=0.00, window=0, true, USER_REQUEST]
10:29:15.552                          D  timeline [eventTime=0.04, mediaPos=0.00, window=0, periodCount=22, windowCount=22, reason=PLAYLIST_CHANGED
10:29:15.552                          D    period [?]
10:29:15.552 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) identical 1 line
10:29:15.552 EventLogger              D    period [?]
10:29:15.552                          D    ...
10:29:15.552                          D    window [?, seekable=false, dynamic=true]
10:29:15.552 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) identical 1 line
10:29:15.552 EventLogger              D    window [?, seekable=false, dynamic=true]
10:29:15.552                          D    ...
10:29:15.552                          D  ]
10:29:15.554                          D  mediaItem [eventTime=0.04, mediaPos=0.00, window=0, reason=PLAYLIST_CHANGED]
10:29:15.561                          D  state [eventTime=0.05, mediaPos=0.00, window=0, BUFFERING]
10:29:15.663 mali_winsys              D  EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
10:29:15.678 EventLogger              D  surfaceSize [eventTime=0.16, mediaPos=0.00, window=0, 1920, 1080]
10:29:15.694                          D  loading [eventTime=0.18, mediaPos=0.00, window=0, period=0, true]
10:29:15.701                          D  timeline [eventTime=0.19, mediaPos=0.00, window=0, period=0, periodCount=22, windowCount=22, reason=SOURCE_UPDATE
10:29:15.701                          D    period [?]
10:29:15.701 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) identical 1 line
10:29:15.702 EventLogger              D    period [?]
10:29:15.702                          D    ...
10:29:15.702                          D    window [?, seekable=false, dynamic=false]
10:29:15.702                          D    window [?, seekable=false, dynamic=true]
10:29:15.702                          D    window [?, seekable=false, dynamic=true]
10:29:15.702                          D    ...
10:29:15.702                          D  ]
10:29:15.739 gralloc                  I  ddebug, pair (share_fd=96, user_hnd=2, ion_client=82)
10:29:15.793 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 44, 1920, 1124]
10:29:15.805 gralloc                  I  ddebug, pair (share_fd=99, user_hnd=3, ion_client=82)
10:29:15.810 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 43, 1920, 1123]
10:29:15.826                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 42, 1920, 1122]
10:29:15.842                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 41, 1920, 1121]
10:29:15.859                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 38, 1920, 1118]
10:29:15.866 MediaCodecInfo           D  NoSupport [codec.profileLevel, hvc1.1.6.L186.B0, video/hevc] [OMX.amlogic.hevc.decoder.awesome, video/hevc] [franklin, Q3, Droidlogic, 28]
10:29:15.867                          D  NoSupport [codec.profileLevel, hvc1.1.6.L186.B0, video/hevc] [OMX.google.hevc.decoder, video/hevc] [franklin, Q3, Droidlogic, 28]
10:29:15.868                          D  NoSupport [codec.profileLevel, hvc1.1.6.L186.B0, video/hevc] [OMX.amlogic.hevc.decoder.awesome, video/hevc] [franklin, Q3, Droidlogic, 28]
10:29:15.868                          D  NoSupport [codec.profileLevel, hvc1.1.6.L186.B0, video/hevc] [OMX.google.hevc.decoder, video/hevc] [franklin, Q3, Droidlogic, 28]
10:29:15.869 EventLogger              D  timeline [eventTime=0.35, mediaPos=0.00, window=0, period=0, periodCount=22, windowCount=22, reason=SOURCE_UPDATE
10:29:15.870                          D    period [2594.41]
10:29:15.870                          D    period [?]
10:29:15.870                          D    period [?]
10:29:15.870                          D    ...
10:29:15.871                          D    window [2594.41, seekable=true, dynamic=false]
10:29:15.871                          D    window [?, seekable=false, dynamic=true]
10:29:15.871                          D    window [?, seekable=false, dynamic=true]
10:29:15.871                          D    ...
10:29:15.871                          D  ]
10:29:15.876 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 35, 1920, 1115]
10:29:15.880 EventLogger              D  videoEnabled [eventTime=0.37, mediaPos=0.00, window=0, period=0]
10:29:15.882                          D  audioEnabled [eventTime=0.37, mediaPos=0.00, window=0, period=0]
10:29:15.890                          D  tracks [eventTime=0.38, mediaPos=0.00, window=0, period=0
10:29:15.890                          D    group [
10:29:15.891                          D      [ ] Track:0, id=1, mimeType=video/hevc, codecs=hvc1.1.6.L186.B0, res=1280x720, language=und, selectionFlags=[default], supported=NO_EXCEEDS_CAPABILITIES
10:29:15.891                          D    ]
10:29:15.891                          D    group [
10:29:15.891                          D      [X] Track:0, id=2, mimeType=video/avc, codecs=avc1.64001F, res=1280x720, language=und, supported=YES
10:29:15.891                          D    ]
10:29:15.891                          D    group [
10:29:15.891                          D      [X] Track:0, id=3, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=en, selectionFlags=[default], supported=YES
10:29:15.891                          D    ]
10:29:15.891                          D    group [
10:29:15.891                          D      [X] Track:0, id=4, mimeType=application/x-subrip, language=nl, selectionFlags=[default], supported=YES
10:29:15.892                          D    ]
10:29:15.892                          D  ]
10:29:15.893 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 30, 1920, 1110]
10:29:15.900 OMXClient                I  IOmx service obtained
10:29:15.905 EventLogger              D  downstreamFormat [eventTime=0.39, mediaPos=0.00, window=0, period=0, id=2, mimeType=video/avc, codecs=avc1.64001F, res=1280x720, language=und]
10:29:15.909 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 26, 1920, 1106]
10:29:15.911 SurfaceUtils             D  connecting to surface 0x8c4f8008, reason connectToSurface
10:29:15.912 MediaCodec               I  [OMX.amlogic.avc.decoder.awesome] setting surface generation to 11508740
10:29:15.912 SurfaceUtils             D  disconnecting from surface 0x8c4f8008, reason connectToSurface(reconnect)
10:29:15.912                          D  connecting to surface 0x8c4f8008, reason connectToSurface(reconnect)
10:29:15.913 AmAVUtils                I  AmAVUtils::getComponentRole isEncoder :0 mime:video/avc 
10:29:15.913 AVUtils                  V  AVUtils::getComponentRole
10:29:15.915 ACodec                   E  [OMX.amlogic.avc.decoder.awesome] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648
10:29:15.922 AmAVUtils                I  AmAVUtils::isAudioExtendFormat input = video/avc
10:29:15.922                          I  AmAVUtils::isExtendFormat input = video/avc
10:29:15.922 ACodec                   I  codec does not support config priority (err -1010)
10:29:15.926 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 21, 1920, 1101]
10:29:15.944                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 17, 1920, 1097]
10:29:15.958 SurfaceUtils             D  disconnecting from surface 0x8c4f8008, reason setNativeWindowSizeFormatAndUsage
10:29:15.958                          D  connecting to surface 0x8c4f8008, reason setNativeWindowSizeFormatAndUsage
10:29:15.960 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 14, 1920, 1094]
10:29:15.965 SurfaceUtils             D  set up nativeWindow 0x8c4f8008 for 1280x720, color 0x11, rotation 0, usage 0x402933
10:29:15.972 gralloc                  I  ddebug, pair (share_fd=104, user_hnd=4, ion_client=82)
10:29:15.972                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:15.976 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 11, 1920, 1091]
10:29:15.985 gralloc                  I  ddebug, pair (share_fd=106, user_hnd=5, ion_client=82)
10:29:15.985                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:15.991                          I  ddebug, pair (share_fd=108, user_hnd=6, ion_client=82)
10:29:15.991                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:15.993 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 9, 1920, 1089]
10:29:16.000 gralloc                  I  ddebug, pair (share_fd=110, user_hnd=7, ion_client=82)
10:29:16.000                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:16.007                          I  ddebug, pair (share_fd=112, user_hnd=8, ion_client=82)
10:29:16.007                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:16.009 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 7, 1920, 1087]
10:29:16.018 gralloc                  I  ddebug, pair (share_fd=114, user_hnd=9, ion_client=82)
10:29:16.018                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:16.024                          I  ddebug, pair (share_fd=116, user_hnd=a, ion_client=82)
10:29:16.024                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:16.026 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 6, 1920, 1086]
10:29:16.036 gralloc                  I  ddebug, pair (share_fd=118, user_hnd=b, ion_client=82)
10:29:16.036                          W  omx buffer: descriptorInfo->width:1280 descriptorInfo->height:720
10:29:16.045 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 4, 1920, 1084]
10:29:16.056 EventLogger              D  videoDecoderInitialized [eventTime=0.54, mediaPos=0.00, window=0, period=0, OMX.amlogic.avc.decoder.awesome]
10:29:16.060 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 3, 1920, 1083]
10:29:16.073 EventLogger              D  videoInputFormat [eventTime=0.55, mediaPos=0.00, window=0, period=0, id=2, mimeType=video/avc, codecs=avc1.64001F, res=1280x720, language=und]
10:29:16.076 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 3, 1920, 1083]
10:29:16.078 EventLogger              D  downstreamFormat [eventTime=0.56, mediaPos=0.00, window=0, period=0, id=3, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=en, selectionFlags=[default]]
10:29:16.090 OMXClient                I  IOmx service obtained
10:29:16.093 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 2, 1920, 1082]
10:29:16.101 AmAVUtils                I  AmAVUtils::getComponentRole isEncoder :0 mime:audio/mp4a-latm 
10:29:16.102 AVUtils                  V  AVUtils::getComponentRole
10:29:16.104 AmAVUtils                I  AmAVUtils::isAudioExtendFormat input = audio/mp4a-latm
10:29:16.104                          I  AmAVUtils::isExtendFormat input = audio/mp4a-latm
10:29:16.106 ACodec                   I  codec does not support config priority (err -2147483648)
10:29:16.109 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 1, 1920, 1081]
10:29:16.126                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 1, 1920, 1081]
10:29:16.137 EventLogger              D  audioDecoderInitialized [eventTime=0.62, mediaPos=0.00, window=0, period=0, OMX.google.aac.decoder]
10:29:16.139                          D  audioInputFormat [eventTime=0.62, mediaPos=0.00, window=0, period=0, id=3, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=44100, language=en, selectionFlags=[default]]
10:29:16.143 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.160                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.176                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.193                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.211                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.220 gralloc                  I  ddebug, free share_fd=132, user_hnd=0xd, ion client=82
10:29:16.221                          I  ddebug, free share_fd=86, user_hnd=0x1, ion client=82
10:29:16.221                          I  ddebug, free share_fd=130, user_hnd=0xc, ion client=82
10:29:16.221 BufferQueueProducer      E  [com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.SampleChooserActivity#0] disconnect: not connected (req=1)
10:29:16.229 libEGL                   W  EGLNativeWindowType 0x8c003008 disconnect failed
10:29:16.294 Layer                    E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.309                          E  layer [Background for -SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity#0] computeScreenBounds - NO PARENT [0, 0, 1920, 1080]
10:29:16.531 exoplayer2.dem           I  Background concurrent copying GC freed 15789(1142KB) AllocSpace objects, 2235(149MB) LOS objects, 24% free, 6MB/9MB, paused 85us total 211.026ms
10:29:16.669 gralloc                  I  ddebug, pair (share_fd=123, user_hnd=1, ion_client=82)
10:29:24.797 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:24.801 EventLogger              D  loading [eventTime=9.29, mediaPos=0.00, window=0, period=0, false]
10:29:24.801 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:25.178 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) ExoPlayer:Playb identical 37 lines
10:29:25.187 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:25.197                          W  Target buffer size reached with less than 500ms of buffered media data.
10:29:25.755 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) ExoPlayer:Playb identical 55 lines
10:29:25.764 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:25.775                          W  Target buffer size reached with less than 500ms of buffered media data.
10:29:27.685 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) ExoPlayer:Playb identical 189 lines
10:29:27.695 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:27.705                          W  Target buffer size reached with less than 500ms of buffered media data.
10:29:28.759 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) ExoPlayer:Playb identical 104 lines
10:29:28.769 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:28.779                          W  Target buffer size reached with less than 500ms of buffered media data.
10:29:28.799 chatty                   I  uid=10061(com.google.android.exoplayer2.demo) ExoPlayer:Playb identical 2 lines
10:29:28.809 DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.
10:29:28.814 ExoPlayerImplInternal    E  Playback error
                                           com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616)
                                               at android.os.Handler.dispatchMessage(Handler.java:102)
                                               at android.os.Looper.loop(Looper.java:193)
                                               at android.os.HandlerThread.run(HandlerThread.java:65)
                                           Caused by: java.lang.IllegalStateException: Playback stuck buffering and not loading
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1070)
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)
                                               at android.os.Handler.dispatchMessage(Handler.java:102) 
                                               at android.os.Looper.loop(Looper.java:193) 
                                               at android.os.HandlerThread.run(HandlerThread.java:65) 
10:29:28.928 EventLogger              D  videoDisabled [eventTime=13.41, mediaPos=0.00, window=0, period=0]
10:29:28.933                          D  audioDisabled [eventTime=13.42, mediaPos=0.00, window=0, period=0]
10:29:29.107 SurfaceUtils             D  disconnecting from surface 0x8c4f8008, reason disconnectFromSurface
10:29:29.107 gralloc                  I  ddebug, free share_fd=104, user_hnd=0x4, ion client=82
10:29:29.107                          I  ddebug, free share_fd=106, user_hnd=0x5, ion client=82
10:29:29.107                          I  ddebug, free share_fd=108, user_hnd=0x6, ion client=82
10:29:29.107                          I  ddebug, free share_fd=110, user_hnd=0x7, ion client=82
10:29:29.107                          I  ddebug, free share_fd=112, user_hnd=0x8, ion client=82
10:29:29.108                          I  ddebug, free share_fd=114, user_hnd=0x9, ion client=82
10:29:29.108                          I  ddebug, free share_fd=116, user_hnd=0xa, ion client=82
10:29:29.108                          I  ddebug, free share_fd=118, user_hnd=0xb, ion client=82
10:29:29.116 EventLogger              D  videoDecoderReleased [eventTime=13.60, mediaPos=0.00, window=0, period=0, OMX.amlogic.avc.decoder.awesome]
10:29:29.129                          D  audioDecoderReleased [eventTime=13.61, mediaPos=0.00, window=0, period=0, OMX.google.aac.decoder]
10:29:29.139                          E  playerFailed [eventTime=13.62, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_FAILED_RUNTIME_CHECK
                                           com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616)
                                               at android.os.Handler.dispatchMessage(Handler.java:102)
                                               at android.os.Looper.loop(Looper.java:193)
                                               at android.os.HandlerThread.run(HandlerThread.java:65)
                                           Caused by: java.lang.IllegalStateException: Playback stuck buffering and not loading
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1070)
                                               at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)
                                               at android.os.Handler.dispatchMessage(Handler.java:102) 
                                               at android.os.Looper.loop(Looper.java:193) 
                                               at android.os.HandlerThread.run(HandlerThread.java:65) 
                                         ]
10:29:29.142                          D  state [eventTime=13.63, mediaPos=0.00, window=0, period=0, IDLE]

Devices that reproduce the issue

  • 905x3 Android 9.1

ExoPlayer Version

  • The latest version Demo

Media

  • the link is protected, if u want to test, I will send to your email

I think maybe the issue is related to sw, because its android media player can't work well.

@icbaker
Copy link
Collaborator

icbaker commented Jun 21, 2022

This issue looks like it's related to the media being played. In particular the root cause is these lines I think:

DefaultLoadControl       W  Target buffer size reached with less than 500ms of buffered media data.

java.lang.IllegalStateException: Playback stuck buffering and not loading

Please provide media we can use to reproduce the issue.

@icbaker icbaker self-assigned this Jun 21, 2022
@icbaker icbaker changed the title ERROR_CODE_FAILED_RUNTIME_CHECK "Playback stuck buffering and not loading" error Jun 21, 2022
@VeiZhang
Copy link
Author

@icbaker Ok, thanks. I will send media stream to the email [email protected].

@VeiZhang
Copy link
Author

@icbaker Hello, do u receive the media stream?

@icbaker
Copy link
Collaborator

icbaker commented Jun 27, 2022

I played the provided video file in the 2.18.0 demo app and it played without error. I played the first 1 minute (the logs provided in the original comment suggest that playback never begins).

I also played it in the 2.17.1 demo app, and it also played without error for the first 1 minute.

I do see the same logs in logcat, but in my case they didn't seem to cause playback issues:

com.google.android.exoplayer2.demo W/DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.

Assigning to @tonihei to take a look to see if there's an obvious cause for these logs from DefaultLoadControl and what might be causing the playback failure reported.

@icbaker icbaker assigned tonihei and unassigned icbaker Jun 27, 2022
@tonihei
Copy link
Collaborator

tonihei commented Jul 1, 2022

I can easily reproduce the problem on a Pixel 5.

The reason playback is stuck is that:

  • The file declares two video tracks (one using HEVC, one using AVC).
  • ExoPlayer selects the AVC track on my test device (because the HEVC one isn't supported by the device's decoders)
  • When reading the file in sequential order, only samples for the HEVC track are read and not a single AVC sample. I even tried to remove the upper memory limit, but still no AVC sample found until I ran into OutOfMemory errors. So either the file doesn't contain any AVC video samples (and the track declaration is wrong), or they are not properly interleaved (which is also wrong, because the file becomes unplayable without fully reading it into memory).

The last point means this can be classified as bad media.


There is one related issue that might be worth fixing. When I force the selection of the HEVC track, the file becomes playable because we no longer need the missing AVC samples (@icbaker I assume your test device just supported the track directly, hence you couldn't see the stuck playback). However, the buffered position stays at 0 because that's the minimum buffered duration across all A/V tracks including the AVC track. This causes the log spam about Target buffer size reached with less than 500ms of buffered media data.. It seems sensible to only include selected tracks in the buffered position calculation even though we still read all tracks in a progressive streams (including disabled ones).

marcbaechinger pushed a commit to androidx/media that referenced this issue Jul 4, 2022
ProgressiveMediaPeriod loads all available tracks into SampleStreams
(because it needs to read the data anyway and it allows easy activation
of tracks without reloading). However, the SampleStreams for disabled
tracks are not read and no one if waiting for them.

The buffered position is used for user-visible state (e.g. in the UI)
and to check how much data is already buffered to decide when to stop
buffering (using LoadControl). Both values benefit from only
using the actually enabled tracks to better reflect what is available
for playback at the moment.

Issue:Issue: google/ExoPlayer#10361
PiperOrigin-RevId: 458475038
rohitjoins pushed a commit that referenced this issue Jul 7, 2022
ProgressiveMediaPeriod loads all available tracks into SampleStreams
(because it needs to read the data anyway and it allows easy activation
of tracks without reloading). However, the SampleStreams for disabled
tracks are not read and no one if waiting for them.

The buffered position is used for user-visible state (e.g. in the UI)
and to check how much data is already buffered to decide when to stop
buffering (using LoadControl). Both values benefit from only
using the actually enabled tracks to better reflect what is available
for playback at the moment.

Issue:Issue: #10361
PiperOrigin-RevId: 458475038
@tonihei
Copy link
Collaborator

tonihei commented Jul 15, 2022

The issue outlined in the comment above is fixed now.

@tonihei tonihei closed this as completed Jul 15, 2022
rohitjoins pushed a commit that referenced this issue Jul 15, 2022
ProgressiveMediaPeriod loads all available tracks into SampleStreams
(because it needs to read the data anyway and it allows easy activation
of tracks without reloading). However, the SampleStreams for disabled
tracks are not read and no one if waiting for them.

The buffered position is used for user-visible state (e.g. in the UI)
and to check how much data is already buffered to decide when to stop
buffering (using LoadControl). Both values benefit from only
using the actually enabled tracks to better reflect what is available
for playback at the moment.

Issue:Issue: #10361
PiperOrigin-RevId: 458475038
(cherry picked from commit 577e191)
rohitjoins pushed a commit to androidx/media that referenced this issue Jul 15, 2022
ProgressiveMediaPeriod loads all available tracks into SampleStreams
(because it needs to read the data anyway and it allows easy activation
of tracks without reloading). However, the SampleStreams for disabled
tracks are not read and no one if waiting for them.

The buffered position is used for user-visible state (e.g. in the UI)
and to check how much data is already buffered to decide when to stop
buffering (using LoadControl). Both values benefit from only
using the actually enabled tracks to better reflect what is available
for playback at the moment.

Issue:Issue: google/ExoPlayer#10361
PiperOrigin-RevId: 458475038
(cherry picked from commit ceb23e6)
@VeiZhang
Copy link
Author

@tonihei Hello, I want to ask whether it need to set config to enable? Because I try the latest version code still not work.

@tonihei
Copy link
Collaborator

tonihei commented Jul 20, 2022

Because I try the latest version code still not work.

The fix is only in the dev-v2 branch and not in any proper release yet. It will be part of 2.18.1 that is likely to be released this week.

@VeiZhang
Copy link
Author

@tonihei Got it, thanks a lot.

@google google locked and limited conversation to collaborators Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants