Exoplayer: Video player crash when scrubbing through mid-roll

Created on 11 Jun 2020  路  2Comments  路  Source: google/ExoPlayer

Issue description

Player crash while scrub through ads

Reproduction steps

Play a video for VMAP pre-roll single ad, mid-roll standard pods with 5 ads every 10 seconds
let the pre-roll play, now scrub through 5th mid-roll and let a mid roll will play.
Now scrub before 2nd mid-roll and app will crash with,

2020-06-11 14:42:28.717 13004-13004/com.google.android.exoplayer2.demo E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.google.android.exoplayer2.demo, PID: 13004
    java.lang.IllegalStateException
        at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:81)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.stopAd(ImaAdsLoader.java:944)
        at com.google.ads.interactivemedia.v3.internal.akf.a(IMASDK:24)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:177)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:44)
        at com.google.ads.interactivemedia.v3.internal.ake.b(IMASDK:28)
        at com.google.ads.interactivemedia.v3.internal.akc.shouldOverrideUrlLoading(IMASDK:6)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-Monochrome.aab-stable-410410170:16)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:323)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:6165)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)

Also sometime time content just stuck after ad is done, and log says ad is in progress but it is actually done, player is not able to switch from IMA.

Link to test content

Reproducible on sample app

A full bug report captured from the device

bugreport-NPD26.48-24-1-2020-06-11-14-30-51.zip

Version of ExoPlayer being used

2.11.5

Device(s) and version(s) of Android being used

Bug report is from Motorola X play OS 7.1.1
but happens on Emulator API 21 and above (did not check older APIs)

bug

Most helpful comment

Fixed in the commits referenced above. This will be part of 2.11.6, which should be released today or tomorrow.

All 2 comments

There seem to be two (likely related) issues to do with preloading and seeking:

  1. After an ad pod coming up has preloaded, if the user seeks before it plays we get pauseAd/stopAd called for that ad pod. I think this is unexpected because playAd was never called for the ad.
  2. If the user seeks back, the ad pod never loads again.

I've filed [Internal: b/159111848] to ask the IMA SDK team to take a look at this.

In the short term, 5a88e0bc1d37b8cd16f993ae51ebe17fa9358ab9 should avoid crashing for this case, and I'll plan to make another commit that will not treat this as an unexpected failure (to avoid discarding all ads) for (1). To address (2) I'll mark the preloaded ad as skipped at the moment when stopAd is unexpectedly called.

Fixed in the commits referenced above. This will be part of 2.11.6, which should be released today or tomorrow.

Was this page helpful?
0 / 5 - 0 ratings