[ANDROID] Hi ANR Rate on Android TV

74 views
Skip to first unread message

Igor

unread,
Nov 14, 2022, 9:43:19 AM11/14/22
to Interactive Media Ads SDK
Hi.

  We've recently release the build with IMA 3.29.0 for Android. Unfortunately we experience the following issue while loading the ads:

#00 pc 0x0000000000019d54 /system/lib/libc.so (syscall+28) #01 pc 0x00000000000a6c63 /system/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+86)
#02 pc 0x00000000003dd8c3 /system/lib/libart.so (art::GoToRunnable(art::Thread*) (.llvm.<US_SOCIAL_SECURITY_NUMBER>)+322)
#03 pc 0x00000000003dd759 /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+8) at J.N.MAqmDh4t (Native method)
at org.chromium.content.browser.framehost.NavigationControllerImpl.h (chromium-SystemWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:2960)
at org.chromium.android_webview.AwContents.q (chromium-SystemWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:2252)
at org.chromium.android_webview.AwContents.r (chromium-SystemWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:2014)
at com.android.webview.chromium.WebViewChromium.loadUrl (chromium-SystemWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:2027)
at android.webkit.WebView.loadUrl (WebView.java:714)
at com.google.ads.interactivemedia.v3.internal.ake.e (IMASDK:1)
at com.google.ads.interactivemedia.v3.internal.ajx.c (IMASDK:2)
at com.google.ads.interactivemedia.v3.internal.aiq.l (IMASDK:1)
at com.google.ads.interactivemedia.v3.api.ImaSdkFactory.createAdsLoader (IMASDK:7)
at com.google.ads.interactivemedia.v3.api.ImaSdkFactory.createAdsLoader (IMASDK:4)
at com.wildspike.advertise.imawrapper.VideoPlayerController.<init> (VideoPlayerController.java:204)


These ANRs are approximately 25% of all ANRs we have. Any ideas what could possibly go wrong?

IMA SDK

unread,
Nov 14, 2022, 2:08:57 PM11/14/22
to ig...@wildspike.com, ima...@googlegroups.com
Hi Igor,

In order for us to investigate this further, could you please provide to us a sample project via reply privately to author option? You may also provide is to us using the steps below.
 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002gOX99QAG&entry.80707362=00157033

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.



Regards,
Google Logo
Teejay Wennie
IMA SDK Team
 


ref:_00D1U1174p._5004Q2gOX99:ref

Igor Lobanchikov

unread,
Nov 15, 2022, 4:58:33 AM11/15/22
to IMA SDK, ima...@googlegroups.com
Hey, Teejay.

  Could you, please, clarify the following: is the binary of our game enough for you or do you need a minimal repro case?

  Please, note that our application doesn't do anything specific. We just load the ad normally and bump into this ANR. We have similar ANRs to the other mobile ads SDKs. It seems that this is more about the way google chrome works. Here's the link to a similar bug report make by another developer for AdMob https://groups.google.com/g/google-admob-ads-sdk/c/xOeiPr1C0_4 .

Regards,
Igor.

IMA SDK

unread,
Nov 15, 2022, 1:20:45 PM11/15/22
to ig...@wildspike.com, ima...@googlegroups.com
Hi Igor,

We'll need a detailed debug information from a device where it's observed in order to actually make any progress in diagnosing this. The only way for us to investigate further is by a sample app while that reproduce the issue. If the reported issue is reliably reproducible on your end, then kindly provide to us a sample project using the steps I've provided. However, if the issue is not locally reproducible, then kindly provide the following instead.
  • Percentage occurrence 
  • Affected devices 

Igor Lobanchikov

unread,
Nov 16, 2022, 6:09:25 AM11/16/22
to IMA SDK, ima...@googlegroups.com
Hi Teejay.

  I understand. Unfortunately we can't reproduce this issue in-house. Google play console statistics show a lot of extremely similar ANRs which influence 28,4% of users affected by ANRs (and more, summing only the first few tens of cases of this issue). Which is 4.13% of all our Android TV users. That's a lot. As for devices, please, see the attached grouped report for the top few cases.

Please, let me know if you need more information.

Regards,
Igor.

Report for IMA developers(1).zip

IMA SDK

unread,
Nov 16, 2022, 11:36:55 AM11/16/22
to ig...@wildspike.com, ima...@googlegroups.com
Hi Igor,

Thank you for getting back to us. I'll be raising this (including the reports and discussion thus far) to the rest of the team for further investigation. I'll update this thread the soonest the team share their feedback.

IMA SDK

unread,
Nov 17, 2022, 4:21:47 PM11/17/22
to ima...@googlegroups.com, ig...@wildspike.com
Hello Igor,

This is Jackson from the IMA SDK team to help with your issue. Would it be possible to share any additional details about your app?
- A sample snippet of your IMA SDK implementation.
- Are you using client-side ads or DAI (dynamic ad insertion) ads?
- Can you share a sample ad tag or stream info that is causing the error.

Any other details about your implementation could help as well.

If you are sharing ad tags or stream info, please share this directly with me (js...@google.com).

Thank you,
Jackson
IMA SDK team

ref:_00D1U1174p._5004Q2gOX99:ref

Igor Lobanchikov

unread,
Nov 18, 2022, 1:00:40 PM11/18/22
to IMA SDK, ima...@googlegroups.com
Hi Jackson.

   It will take some time to prepare the sample, but there's no guarantee it will work as our game. It will definitely use less CPU and memory. We also will share the tag too.

  Our application is a game and we are using client-side ads with video player being created only to play ad. Once the ad is played, the player is destroyed and the new one is created to preload the next ad.

Regards,
Igor.

IMA SDK

unread,
Nov 18, 2022, 4:31:47 PM11/18/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

Thanks for the update. Once you are able to share the ad tag I can start work on reproducing the crash in our sample apps.

If your team is able to find a way to reliably reproduce the issue, that would still be best to help work towards a fix.

Igor Lobanchikov

unread,
Nov 22, 2022, 9:36:53 AM11/22/22
to IMA SDK, ima...@googlegroups.com
Hi Jackson.

  Just sent the vast tags to your e-mail. We still didn't manage to reproduce the issue on our side.

  I'm just wondering what could go wrong. If you download something in the main thread or if you let webview to load a huge script, or if you cache something on disk, then let web view load it from there -- all of this might be an issue. Altogether with the actual webview creation.

  IO operations from the file system in the main thread might be especially dangerous since our game loads a lot of textures and our game thread will compete with the main thread for IO bandwidth. Loading huge scripts to web view is also pretty bad idea: it seems that webview blocks our game while the script is being preprocessed for some reason. The same might be true for downloading the script from the web.

Regards,
Igor.

IMA SDK

unread,
Nov 22, 2022, 11:06:31 AM11/22/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

Thank you for replying back. I did receive the email with your shared ad tags. However, when testing with them, I was unable to have any ads play back. Is there any geo-restrictions on the ads?

Igor Lobanchikov

unread,
Nov 22, 2022, 2:44:56 PM11/22/22
to IMA SDK, ima...@googlegroups.com
Hi Jackson. 

  I don’t think thee are any georestrictions, but you might need to use our bundle id for your application — com.wildspike.wormszone. Please, let me know if this doesn’t work for you.

  Please, note that it seems that ANR happens for one of the first few ad loads only.


--
Regards,
Igor.

IMA SDK

unread,
Nov 23, 2022, 11:04:03 AM11/23/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

When testing with the ad tags and updating the application ID to "com.wildspike.wormszone", I am still unable to see ad playback.

As a check solely for the ad tags, are you able to see ad playback when using the IMA video suite inspector?

Thank you,

Igor Lobanchikov

unread,
Nov 28, 2022, 5:35:35 AM11/28/22
to IMA SDK, ima...@googlegroups.com
Hi,

  could you, please, tell me the region. Will talk to the ads provider.

Regards,
Igor.


--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/LzTOxOMQeVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ima-sdk/qtPvo000000000000000000000000000000000000000000000RLT5YJ00MsMkrL-fSCWpbVVcuVPJiQ%40sfdc.net.

IMA SDK

unread,
Nov 28, 2022, 11:16:15 AM11/28/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

I am testing from the United States, please let me know if any additional steps will be needed for me to reproduce the issue.

Igor Lobanchikov

unread,
Dec 1, 2022, 9:35:56 AM12/1/22
to IMA SDK, ima...@googlegroups.com
Hi Jackson.

  I've double-checked with our ad provider. They say they have enough ad traffic for the US. Please, note that they do check the package ID you send them. So you need to send them our package ID to be able to see anything.

Regards,
Igor.

IMA SDK

unread,
Dec 6, 2022, 3:37:27 PM12/6/22
to ig...@wildspike.com, ima...@googlegroups.com
Hi Igor,

This is Thang, covering for Jackson as he's on vacation.

Since you are not able to reproduce the issue and the VAST tag is still not playing in our IMA HTML5 Video Suite inspector (even after I added msid=com.wildspike.wormszone&an=wormszone to specify the package ID), we couldn't find a way to reliably reproduce the issue.

To move this forward, I filed a bug for our engineers to search for more crash logs on our end to see if we could correlate any ANR with your reports.
On your end, could you please try to reduce IO operations and wait for the ads to be loaded?

Thanks,
Thang

ref:_00D1U1174p._5004Q2gOX99:ref

Igor Lobanchikov

unread,
Dec 15, 2022, 4:01:35 AM12/15/22
to IMA SDK, ima...@googlegroups.com
Hi Thang.

  Thanks for an update. Sorry for the late reply -- we are releasing the Chrismas updates and are absolutely overloaded. We are working on making the game start up process more lightweight, but it's really hard to start the game with reduced I/O or to wait for an unknown period of time until the ads are loaded, so we don't have much progress with this. We are also considering pre-initializing Chrome to reduce the pressure on UI thread when the ad is loaded.

Regards,
Igor.

IMA SDK

unread,
Dec 15, 2022, 11:29:03 AM12/15/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

Quick question, for the sheet you shared with the ANR rates, what are the column headers for the table?

Igor Lobanchikov

unread,
Dec 15, 2022, 12:30:58 PM12/15/22
to IMA SDK, ima...@googlegroups.com
Hi.

  They are device model, device ram (available to OS), SoC. times happened, %of anr's in table. Please, note that this was an early report.

  Not sure which of the device strings the model matches, but we could sort this out.

Regards,
Igor.

IMA SDK

unread,
Dec 15, 2022, 1:26:38 PM12/15/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

Thank you for the quick reply.

We were not able to correlate any specific IMA error/issue with our logs for your app. Next steps for us to continue looking into this issue would be a reproducible case I could share with our engineers. Please let me know if that would be possible, ideally using one of the IMA sample apps with minimum modifications. I understand that it is a crunch time for you team, so please let me know if there is anything I can do to expedite this. 

IMA SDK

unread,
Dec 15, 2022, 1:59:52 PM12/15/22
to ima...@googlegroups.com, ig...@wildspike.com
A couple of other quick questions:

What is SoC?

And, I believe the sheet shows 199 ANRs, do you know over what timeframe, or out of how many total page loads, or ad requests?

Thank you,

Igor Lobanchikov

unread,
Dec 16, 2022, 5:24:57 AM12/16/22
to IMA SDK, ima...@googlegroups.com
Hi Jackson.

  SoC stands for System on Chip -- essentially this is CPU+CPU+Chipset unit for mobile devices (and TVs which nowadays use the same hardware).

These lines are from one of the previous emails. Page loads are irrelevant for use. Our application is a native Android game and we use your native Android SDK. Not quite sure we can reproduce the case easily in your sample since we have to know for sure the reason for ANR. And if we knew the reason we would probably find a workaround to prevent the situation. Anyway, I will look into this. The biggest problem that we can't reproduce this in-house, which means in order to get rid of ANR we have to roughly clean up all the code following the generic ANR prevention ideas. As for you it will be
1. reduce the I/O operations. It seems you download some scripts from the internet. It might be a good idea to keep these scripts as small as possible and cached in RAM, if this is the case, or replace them with the native code. It might be also a good idea to allow us to choose the very moment when the script is saved/loadid to/from flash memory.
2. you can't do anything about the browser. We've noticed the browser initialization might be a huge performance hit, so one of our next builds will pre-cache it.

>  Google play console statistics show a lot of extremely similar ANRs which influence 28,4% of users affected by ANRs (and more, summing only the first few tens of cases of this issue). Which is 4.13% of all our Android TV users. That's a lot.

Regards,
Igor.

IMA SDK

unread,
Dec 19, 2022, 3:34:06 PM12/19/22
to ig...@wildspike.com, ima...@googlegroups.com
Hello Igor,

Thank you for clarifying, I will let you know when I have any updates from the investigation on our end.

IMA SDK

unread,
Jan 3, 2023, 11:14:16 AM1/3/23
to ima...@googlegroups.com, ig...@wildspike.com
Hi Igor,

I wanted to check in if there were any update on this issue from your end. Checking with the team, we did not have any additional guidance to give for how to prevent these instances of ANRs. Because of the device specific nature of the crashes, it is difficult for the team to reproduce and fix the issue using an emulator.

Please let me know if you have any questions, or additional info that could help the debugging.

Thank you,

Igor Lobanchikov

unread,
Jan 4, 2023, 6:18:36 AM1/4/23
to IMA SDK, ima...@googlegroups.com
Hi Jackson.

  We are releasing a build today which will precache the web view at the application startup. In a couple of weeks will have the information if it helps to reduce ANRs.

Regards,
Igor.

IMA SDK

unread,
Jan 5, 2023, 8:50:51 AM1/5/23
to ig...@wildspike.com, ima...@googlegroups.com
Hi Igor,

Thank you for the update. Please let me know how the new build affects the ANRs, once it is released.

Dario Tenango

unread,
Jan 5, 2023, 1:58:05 PM1/5/23
to IMA SDK, ig...@wildspike.com, ima...@googlegroups.com
cjingatu madre yayo y chiquispara que se lo sepan pase amirar unos amigis de la pilisia que me abisaron cuando mataron a la mosca de tlaltisapan poreso oygo el programa de las 6 de la mañana en el radio 

--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ima-sdk/Dcz0G000000000000000000000000000000000000000000000RO0MGM00jajtnjV1ShykhHZMAuZbBg%40sfdc.net.

IMA SDK

unread,
Jan 5, 2023, 4:09:53 PM1/5/23
to dariote...@gmail.com, ig...@wildspike.com, ima...@googlegroups.com
Hello,

The IMA technical forum can only support queries in English. For new issue, please open a new thread in the forum for support.

Thank you,
Reply all
Reply to author
Forward
0 new messages