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

Random crashes in IMA #8290

Closed
chladto1 opened this issue Nov 27, 2020 · 3 comments
Closed

Random crashes in IMA #8290

chladto1 opened this issue Nov 27, 2020 · 3 comments
Assignees
Labels

Comments

@chladto1
Copy link

Issue description

Could you please take a look at these logs? These are crashes from Firebase, we do not have any context but hopefully you will found some issue to fix.

Reproduction steps

Unknown

Link to test content

Unknown

A full bug report captured from the device

Crash 1

Fatal Exception: java.lang.IllegalArgumentException
       at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
       at com.google.android.exoplayer2.source.ads.AdPlaybackState$AdGroup.withAdState(AdPlaybackState.java:165)
       at com.google.android.exoplayer2.source.ads.AdPlaybackState.withSkippedAd(AdPlaybackState.java:402)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$ComponentListener.stopAd(ImaAdsLoader.java:1615)
       at com.google.ads.interactivemedia.v3.internal.akp.a(akp.java:16)
       at com.google.ads.interactivemedia.v3.internal.akl.a(akl.java:167)
       at com.google.ads.interactivemedia.v3.internal.akl.a(akl.java:159)
       at com.google.ads.interactivemedia.v3.internal.ako.b(ako.java:20)
       at com.google.ads.interactivemedia.v3.internal.akm.shouldOverrideUrlLoading(akm.java:6)
       at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:77)
       at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:16)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:325)
       at android.os.Looper.loop(Looper.java:142)
       at android.app.ActivityThread.main(ActivityThread.java:6548)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:864)

Crash 2

Fatal Exception: java.lang.NullPointerException: throw with null exception
       at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:147)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.handlePlayerStateChanged(ImaAdsLoader.java:1031)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.onPlayerStateChanged(ImaAdsLoader.java:803)
       at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.lambda$run$5(ExoPlayerImpl.java:828)
       at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$PlaybackInfoUpdate$AYkTJomZb3BnUDA59u8cvRVoKcM.invokeListener(-.java:2)
       at com.google.android.exoplayer2.BasePlayer$ListenerHolder.invoke(BasePlayer.java:182)
       at com.google.android.exoplayer2.ExoPlayerImpl.invokeAll(ExoPlayerImpl.java:845)
       at com.google.android.exoplayer2.ExoPlayerImpl.access$000(ExoPlayerImpl.java:43)
       at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.run(ExoPlayerImpl.java:826)
       at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:736)
       at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:710)
       at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:652)
       at com.google.android.exoplayer2.ExoPlayerImpl.handleEvent(ExoPlayerImpl.java:595)
       at com.google.android.exoplayer2.ExoPlayerImpl$1.handleMessage(ExoPlayerImpl.java:127)
       at android.os.Handler.dispatchMessage(Handler.java:112)
       at android.os.Looper.loop(Looper.java:216)
       at android.app.ActivityThread.main(ActivityThread.java:7625)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

Version of ExoPlayer being used

2.11.8

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

Device and OS independent

@andrewlewis
Copy link
Collaborator

Crash 1 should go away if you upgrade to 2.12 as we now silence the unexpected error from this case, but the root cause it uncertain: it seems we think an ad isn't playing when the IMA SDK notifies stopAd.

For crash 2 I'm making a fix to turn this unexpected case into a warning, which will go into the next release.

Thanks for reporting these issues. If you have any statistics on the relative frequency of the errors it would be helpful if you could share that information so we can decide whether it's worth digging into the causes (as opposed to just suppressing the errors).

@BucherTomas
Copy link

I'll provide the details as we work with @chladto1 on the same projects.

The numbers are actually fairly low, approximately 0.15% of playback sessions are affected by these exceptions, but they are constantly present in the statistics.
So the issues are persistent, albeit with low frequency. However, we don't know how they affect the users. Whether it's without impact from their point of view and the ad is simply skipped, or if they hinder playback.

christosts pushed a commit that referenced this issue Dec 17, 2020
It's intended to log a warning in this case, rather than throw.

Issue: #8290

#minor-release

PiperOrigin-RevId: 347790527
@andrewlewis
Copy link
Collaborator

Thanks for the information. From the next release both errors should be handled by skipping ad playback. Hopefully this is okay for the time being given these are occurring at a low volume.

Longer term it would be good to try to figure out why the unexpected cases are happening. I will plan to discuss with the IMA SDK team what the possible cause could be, and whether we have options for reporting back these non-fatal errors so we can try to eliminate them over time.

icbaker pushed a commit that referenced this issue Jan 11, 2021
It's intended to log a warning in this case, rather than throw.

Issue: #8290

PiperOrigin-RevId: 347790527
@google google locked and limited conversation to collaborators Mar 1, 2021
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

3 participants