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

ArrayIndexOutOfBoundsException in ImaAdsLoader.loadAd #3552

Closed
asidahan opened this issue Dec 5, 2017 · 3 comments
Closed

ArrayIndexOutOfBoundsException in ImaAdsLoader.loadAd #3552

asidahan opened this issue Dec 5, 2017 · 3 comments
Assignees
Labels

Comments

@asidahan
Copy link

asidahan commented Dec 5, 2017

Hi,
we have videos with ads in our app, and we have ArrayIndexOutOfBoundsException in the ima extension. We don't have a specific scenario for this crash and it happens randomly on many devices. I attach the stack trace below:

length=1; index=-1
java.lang.ArrayIndexOutOfBoundsException: length=1; index=-1
	at com.google.android.exoplayer2.ext.ima.AdPlaybackState.addAdUri(AdPlaybackState.java:111)
	at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.loadAd(ImaAdsLoader.java:461)
	at com.google.obf.hm.safedk_VideoAdPlayer_loadAd_38ec4ebf3a116296f255437bbde61c86(IMASDK)
	at com.google.obf.hm.a(IMASDK:36)
	at com.google.obf.hj.e(IMASDK:151)
	at com.google.obf.hj.a(IMASDK:45)
	at com.google.obf.hk.b(IMASDK:39)
	at com.google.obf.hk$1.shouldOverrideUrlLoading(IMASDK:4)
	at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
	at com.android.webview.chromium.Ap.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:72)
	at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:15)
	at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:160)
	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6682)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
@ojw28 ojw28 changed the title ArrayIndexOutOfBoundsException ArrayIndexOutOfBoundsException in ImaAdsLoader.loadAd Dec 5, 2017
@ojw28 ojw28 added the bug label Dec 5, 2017
@andrewlewis
Copy link
Collaborator

Thanks for reporting this. Would you be able to share the ad tag so we can investigate the cause for this? (Please email it to dev.exoplayer@gmail.com if you don't want to share it publicly.)

The IMA SDK is telling us to load an ad but the LOADED ad event hasn't been delivered, so this case is unexpected. I'll see if I can make the loader more robust to this case.

@ojw28
Copy link
Contributor

ojw28 commented Feb 26, 2018

@andrewlewis - Did 2.7.0 fix this?

@andrewlewis
Copy link
Collaborator

Yes, I think this should be fixed.

@google google locked and limited conversation to collaborators Jun 29, 2018
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