You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Placing instance of AdMediaSource within a composite media source like ConcatenatingMediaSource will cause a crash within AdsMediaSource.prepareSourceInternal in the Assertions.checkArgument(isTopLevelSource). As far as I understand, the AdMediaSource is not supposed to be wrapped into another MediaSource, which seems counterintuitive to me. Documentation also doesn't describe this limitation in a clear way.
Reproduction steps
It is easily reproducible in the imademo app. Wrap AdMediaSource into ConcatenatingMediaSource before sending it into ExoPlayer.
Version of ExoPlayer being used
2.8.2
Device(s) and version(s) of Android being used
Android 8.1.0, Google Pixel XL
A full bug report captured from the device
2018-07-27 13:53:13.112 3697-3831/com.google.android.exoplayer2.imademo E/ExoPlayerImplInternal: Internal runtime error.
java.lang.IllegalArgumentException
at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
at com.google.android.exoplayer2.source.ads.AdsMediaSource.prepareSourceInternal(AdsMediaSource.java:312)
at com.google.android.exoplayer2.source.BaseMediaSource.prepareSource(BaseMediaSource.java:137)
at com.google.android.exoplayer2.source.CompositeMediaSource.prepareChildSource(CompositeMediaSource.java:109)
at com.google.android.exoplayer2.source.ConcatenatingMediaSource.addMediaSourceInternal(ConcatenatingMediaSource.java:554)
at com.google.android.exoplayer2.source.ConcatenatingMediaSource.addMediaSourcesInternal(ConcatenatingMediaSource.java:560)
at com.google.android.exoplayer2.source.ConcatenatingMediaSource.prepareSourceInternal(ConcatenatingMediaSource.java:390)
at com.google.android.exoplayer2.source.BaseMediaSource.prepareSource(BaseMediaSource.java:137)
at com.google.android.exoplayer2.ExoPlayerImplInternal.prepareInternal(ExoPlayerImplInternal.java:396)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:286)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
--------- beginning of crash
2018-07-27 13:53:13.113 3697-3831/com.google.android.exoplayer2.imademo E/AndroidRuntime: FATAL EXCEPTION: ExoPlayerImplInternal:Handler
Process: com.google.android.exoplayer2.imademo, PID: 3697
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.source.ads.AdsMediaSource$ComponentListener.release()' on a null object reference
at com.google.android.exoplayer2.source.ads.AdsMediaSource.releaseSourceInternal(AdsMediaSource.java:382)
at com.google.android.exoplayer2.source.BaseMediaSource.releaseSource(BaseMediaSource.java:150)
at com.google.android.exoplayer2.source.CompositeMediaSource.releaseSourceInternal(CompositeMediaSource.java:65)
at com.google.android.exoplayer2.source.ConcatenatingMediaSource.releaseSourceInternal(ConcatenatingMediaSource.java:423)
at com.google.android.exoplayer2.source.BaseMediaSource.releaseSource(BaseMediaSource.java:150)
at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:802)
at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:731)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:353)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
The text was updated successfully, but these errors were encountered:
Issue description
Placing instance of AdMediaSource within a composite media source like
ConcatenatingMediaSource
will cause a crash withinAdsMediaSource.prepareSourceInternal
in theAssertions.checkArgument(isTopLevelSource)
. As far as I understand, the AdMediaSource is not supposed to be wrapped into anotherMediaSource
, which seems counterintuitive to me. Documentation also doesn't describe this limitation in a clear way.Reproduction steps
It is easily reproducible in the
imademo
app. WrapAdMediaSource
intoConcatenatingMediaSource
before sending it intoExoPlayer
.Version of ExoPlayer being used
2.8.2
Device(s) and version(s) of Android being used
Android 8.1.0, Google Pixel XL
A full bug report captured from the device
The text was updated successfully, but these errors were encountered: