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

IllegalStateException for playlists with media from the demo, in certain sequences #2290

Closed
b0g8 opened this issue Jan 4, 2017 · 3 comments
Labels

Comments

@b0g8
Copy link

b0g8 commented Jan 4, 2017

For certain playlist contents, the error above appears 100% (once it did not appear, but maybe I did something different - I did tens of tests to simplify procedure to reproduce)
Tested on Samsung S3 international, current version from dev-v2: da9c10a .
The playlist content should be:
1.audio only
2. video only
3. audio only
4. video only

For example, add the following playlist to media.exolist.json. Then run the code, select the playlist. I usually skip to the last 5-10 seconds of first 2 media by pressing on seekbar (NOT button for next)

 {
        "name": "Bug",
        "playlist": [
          {
            "uri": "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3"
          },
          {
            "uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4"
          },
          {
            "uri": "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3"
          },
          {
            "uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4"
          }
        ]
      }

It is not important that the first two files are the same with the next ones.
It is important that first one has audio only, second video only, third audio only and fourth video only.

In my case it appeared while using a custom renderer (which was rendering from a SingleSampleMediaSource/Period) which was rendering custom content, no audio/video, followed by regular video+audio, followed again by my custom content. It seems to me that situations where renderers are changed across periods are not correctly handled.

If you cannot reproduce it, I'll attach a bug report. Here is the full exception, it should appear after third media:

E/ExoPlayerImplInternal: Internal runtime error.
                                                        java.lang.IllegalStateException
                                                            at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:79)
                                                            at com.google.android.exoplayer2.BaseRenderer.replaceStream(BaseRenderer.java:92)
                                                            at com.google.android.exoplayer2.BaseRenderer.enable(BaseRenderer.java:78)
                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.enableRenderers(ExoPlayerImplInternal.java:1371)
                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.setPlayingPeriodHolder(ExoPlayerImplInternal.java:1348)
                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.updatePeriods(ExoPlayerImplInternal.java:1133)
                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:462)
                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:315)
                                                            at android.os.Handler.dispatchMessage(Handler.java:95)
                                                            at android.os.Looper.loop(Looper.java:176)
                                                            at android.os.HandlerThread.run(HandlerThread.java:61)
                                                            at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
@ojw28 ojw28 added the bug label Jan 4, 2017
@ojw28
Copy link
Contributor

ojw28 commented Jan 4, 2017

This issue only occurs in a fairly niche set of circumstances. There definitely need to be multiple changes in the sets of renderers that are required throughout the playlist. We'll merge a fix sometime this week.

@ojw28
Copy link
Contributor

ojw28 commented Jan 5, 2017

I think the change above fixes this, but please give dev-v2 a try and confirm. Thanks!

@ojw28 ojw28 closed this as completed Jan 5, 2017
@b0g8
Copy link
Author

b0g8 commented Feb 3, 2017

I can confirm that the original issue was solved by the fix, now merged to release-v2. Thanks.

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

No branches or pull requests

2 participants