-
Notifications
You must be signed in to change notification settings - Fork 6k
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
ExoPlayer2 crashes when fetching a Dash manifest with no SegmentTimeline items (yet) #1865
Comments
+1 for the issue fix. I've faced it using exo player 2.0.1, but I saw it previously on 1.x too. manifest:
logs from the test device: 10-12 15:47:02.839 14091-14091/com.example.devnew D/VideoPlayerManagerImpl: preparePlayer() called, uri: http://nonvalid.mpd?abs_begin=2016-10-12T124900Z
10-12 15:47:02.839 14091-14091/com.example.devnew I/ExoPlayerImpl: Init 2.0.1
10-12 15:47:02.844 14091-14091/com.example.devnew D/PlayerErrorListener: start [0]
10-12 15:47:02.844 14091-14091/com.example.devnew D/VideoPlayerManagerImpl: #preparePlayer()#player.setSurface(..)
10-12 15:47:02.969 14091-14091/com.example.devnew D/EventLogger: droppedFrames [230.15, 2]
10-12 15:47:02.969 14091-14091/com.example.devnew D/EventLogger: videoDisabled [230.15]
10-12 15:47:02.974 14091-14091/com.example.devnew D/EventLogger: audioDisabled [230.15]
10-12 15:47:02.974 14091-14091/com.example.devnew D/VideoPlayerManagerImpl: playWhenReady=false, playbackState=buffering
10-12 15:47:02.974 14091-14091/com.example.devnew D/EventLogger: state [0.13, false, B]
10-12 15:47:02.989 14091-14091/com.example.devnew D/com.example.devnew.player.PlayerWrap: onBufferingStatusChanged, isBuffering = true
10-12 15:47:03.169 14091-14242/com.example.devnew D/dalvikvm: GC_FOR_ALLOC freed 3091K, 13% free 65319K/74900K, paused 56ms, total 57ms
10-12 15:47:03.184 14091-14242/com.example.devnew I/dalvikvm-heap: Grow heap (frag case) to 72.709MB for 8294416-byte allocation
10-12 15:47:03.229 14091-14242/com.example.devnew D/dalvikvm: GC_FOR_ALLOC freed 24552K, 42% free 48867K/83004K, paused 45ms, total 45ms
10-12 15:47:03.419 14091-18104/com.example.devnew E/AndroidRuntime: FATAL EXCEPTION: ExoPlayerImplInternal:Handler
Process: com.example.devnew, PID: 14091
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.google.android.exoplayer2.source.dash.manifest.SegmentBase$MultiSegmentBase.getSegmentTimeUs(SegmentBase.java:190)
at com.google.android.exoplayer2.source.dash.manifest.Representation$MultiSegmentRepresentation.getTimeUs(Representation.java:257)
at com.google.android.exoplayer2.source.dash.DashMediaSource$PeriodSeekInfo.createPeriodSeekInfo(DashMediaSource.java:491)
at com.google.android.exoplayer2.source.dash.DashMediaSource.processManifest(DashMediaSource.java:357)
at com.google.android.exoplayer2.source.dash.DashMediaSource.processManifestAndScheduleRefresh(DashMediaSource.java:339)
at com.google.android.exoplayer2.source.dash.DashMediaSource.onManifestLoadCompleted(DashMediaSource.java:249)
at com.google.android.exoplayer2.source.dash.DashMediaSource$ManifestCallback.onLoadCompleted(DashMediaSource.java:587)
at com.google.android.exoplayer2.source.dash.DashMediaSource$ManifestCallback.onLoadCompleted(DashMediaSource.java:581)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.handleMessage(Loader.java:355)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) |
+1 |
I see the issue in the latest 2.0.3 version |
I'm thinking how to implement some temporary workaround. I'll try the approach |
well, I've added simple check |
+1 |
Issue: #1865 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147613244
I think this should be fixed in |
Working great for me! The player shows a black screen (state buffering) until segments are available and then it starts playing. 👍 |
Great; thanks for verifying! |
When doing a live broadcast, and the transmission just started, the Dash manifest may have an empty SegmentTimeline (while the first chunk is getting filled). ExoPlayer2 crashes on that moment.
This is the manifest I'm testing:
And here is an example of the stack trace I'm getting:
The text was updated successfully, but these errors were encountered: