[Android] IMA SDK is causing the whole app to crash if a WebView render process crashes

897 views
Skip to first unread message

Yevhen Huzyk

unread,
Dec 8, 2022, 6:08:02 AM12/8/22
to Interactive Media Ads SDK
Hi,

We have one of the top crashes in our app related to the WebView render process crash which is caused by the IMA SDK that is not handling it. The WebView rendering process might crash for a variety of reasons and in case where it is not handled by ALL of the WebViewClients implemented in the app or in the libraries used by the app - the app will crash because the render process is shared.

The crash stack trace looks approximately like this:

SIGTRAP: Trace/breakpoint trap

0  libmonochrome.so +0x2827d28     0x7617f90d28
1  libmonochrome.so +0x4c81e60     0x761a3eae64
2  libmonochrome.so +0x332c2d0     0x7618a952d4
3  libmonochrome.so +0x2237404     0x76179a0408
4  libmonochrome.so +0x22357d4     0x761799e7d8
5  libmonochrome.so +0x2c12178     0x761837b17c
6  libmonochrome.so +0x2c120fc     0x761837b100
7  libmonochrome.so +0x2c12048     0x761837b04c
8  libutils.so +0x18070            android::Looper::pollInner(int)
9  libutils.so +0x17c74            android::Looper::pollOnce(int, int*, int*, void**)
10 libandroid_runtime.so +0x13fcc0 android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)
11 boot-framework.oat +0x2bf1d8    art_jni_trampoline
12 boot-framework.oat +0x76881c    android.os.MessageQueue.next
13 boot-framework.oat +0x765654    android.os.Looper.loop
14 boot-framework.oat +0x4eaf80    android.app.ActivityThread.main
15 libart.so +0x1365b4             art_quick_invoke_static_stub
16 libart.so +0x1450c8             art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
17 libart.so +0x4b1604             art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)
18 libart.so +0x4b304c             art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)
19 libart.so +0x43ed9c             art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)
20 boot.oat +0xc2c30               art_jni_trampoline
21 boot-framework.oat +0x9d9274    com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
22 boot-framework.oat +0x9e15ac    com.android.internal.os.ZygoteInit.main
23 libart.so +0x1365b4             art_quick_invoke_static_stub
24 libart.so +0x1450c8             art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
25 libart.so +0x4b1604             art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)
26 libart.so +0x4b1264             art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)
27 libart.so +0x3bba34             art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)
28 libandroid_runtime.so +0xc59d8  _JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)
29 libandroid_runtime.so +0xc887c  android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)
30 app_process64 +0x3598           main
31 libc.so +0x7e868                __libc_init

I've shared the sample app for you to check. It is the modified project from the IMA library samples.

Steps to reproduce:
1. Launch the sample app.
2. Launch the ad playback.
3. Push the floating action button which is launching the WebView with "chrome://crash" URL.
4. Observe the crash.

To handle this crash the WebViewClient used in the IMA library has to override the onRenderProcessGone method and return "true" there which is not the case currently.

Can you please fix it and override this method in the WebViewClient ?

IMA SDK

unread,
Dec 9, 2022, 4:18:17 AM12/9/22
to ima...@googlegroups.com

Hi Yevhen,

 

Thank you for reaching out to us.

 

Upon checking your sample app provided, I wasn't able to replicate the whole app crashing upon following the steps to replicate you've provided. With that, can you provide us a screen recording of your replication and device name and versions affected on this?

 

Regards,

Google Logo
Princess Pamela
IMA SDK Team
 


ref:_00D1U1174p._5004Q2h0mxk:ref

Yevhen Huzyk

unread,
Dec 9, 2022, 4:49:38 AM12/9/22
to Interactive Media Ads SDK
Sure, I've attached the video and a stacktrace. This is an emulator of Pixel 5 API 31.
stacktrace.txt

IMA SDK

unread,
Dec 9, 2022, 2:03:18 PM12/9/22
to ima...@googlegroups.com
Hi Yevhen,

Thank you for getting back to us. I've relayed this to a wider team for further investigation. I'll update this thread the soonest I hear back from them.

Regards,
Google Logo
Teejay Wennie
IMA SDK Team
 


ref:_00D1U1174p._5004Q2h0mxk:ref

Yevhen Huzyk

unread,
Jan 10, 2023, 2:20:34 PM1/10/23
to Interactive Media Ads SDK
Hi,

Do you have any update on this?

Regards,
Yevhen

IMA SDK

unread,
Jan 10, 2023, 8:32:11 PM1/10/23
to ima...@googlegroups.com

Hello Yevhen,

 

Thank you for getting back to us. Currently our team are looking into some changes we can improve from the SDK side. We will let you know once we have more information we can share.

 

Regards,

Google Logo
Michael Angelo
IMA SDK Team
 


ref:_00D1U1174p._5004Q2h0mxk:ref

Yevhen Huzyk

unread,
Feb 20, 2023, 11:57:24 AM2/20/23
to Interactive Media Ads SDK
Hello,


Do you have any update on this?

Best regards,
Yevhen

IMA SDK

unread,
Feb 20, 2023, 1:24:19 PM2/20/23
to ima...@googlegroups.com

Hello Yevhen,

 

Thank you for patiently waiting. For now, we don't have much information to share but I can assure you that our team is actively working on the changes we can improve on the SDK side to help with your issue. We will be sure to get back to you with more information. We really appreciate your kind understanding on this.


Regards,

Google Logo
Edessa
IMA SDK Team
 


ref:_00D1U1174p._5004Q2h0mxk:ref

Yevhen Huzyk

unread,
Apr 10, 2023, 9:55:49 AM4/10/23
to Interactive Media Ads SDK
Hello,

Do you have any updates on this one?

Best regards,
Yevhen

IMA SDK

unread,
Apr 11, 2023, 4:01:01 AM4/11/23
to ima...@googlegroups.com

Hi Yevhen,

Your concern is still under investigation. Rest assured we'll keep you posted on any updates regarding this.

Regards,

Google Logo IMA SDK Team


ref:_00D1U1174p._5004Q2h0mxk:ref

Yevhen Huzyk

unread,
Sep 7, 2023, 5:30:47 AM9/7/23
to Interactive Media Ads SDK
Hey guys!

Do you have any news on this one?

Thank you!

IMA SDK

unread,
Sep 7, 2023, 8:18:19 AM9/7/23
to ima...@googlegroups.com

Hi Yevhen,

Our team is continuously working on this. We really appreciate your patience while this concern is being investigated. Please allow me to follow up on our team on your behalf to expedite the investigation. We will get back to you once the information is available. 

This message is in relation to case "ref:_00D1U1174p._5004Q2h0mxk:ref"

Thanks,

 
Google Logo IMA SDK Team


Hermawan Winata

unread,
Jun 11, 2024, 8:38:15 PM6/11/24
to Interactive Media Ads SDK
Hello IMA SDK Team,

Are there any updates on this?
We'd like to resolve our crashes as well when we use Google IMA SDK.
Thank you.

IMA SDK

unread,
Jun 12, 2024, 1:22:23 AM6/12/24
to shin...@gmail.com, ima...@googlegroups.com

Hi,

Thank you for getting back to us.

Your concern is currently under investigation and we have no updates to provide at this time. However, please rest assured that our team is actively working on it. We appreciate your understanding and patience.

This message is in relation to case "ref:!00D1U01174p.!5004Q02h0mxk:ref" (ADR-00159983)


Thanks,
 
Google Logo IMA SDK Team

 

Saniya Khanum Saniya Khanum

unread,
Jun 24, 2024, 12:55:21 PM6/24/24
to Interactive Media Ads SDK
Mohammad Farooq MASLIYAR 

IMA SDK

unread,
Jun 24, 2024, 2:10:03 PM6/24/24
to saniyakhanums...@gmail.com, ima...@googlegroups.com

Hi,

Thank you for getting back to us.

We are currently under investigation and we have no updates to provide at this time. However, please rest assured that our team is actively working on it. We appreciate your understanding and patience.

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJS6b:ref" (ADR-00243611)


Thanks,
 
Google Logo IMA SDK Team


Hermawan Winata

unread,
Sep 10, 2024, 12:23:24 AM9/10/24
to Interactive Media Ads SDK
Hi team, 

Could you share if there any updates or timeline for this fix?
Thank you.

IMA SDK

unread,
Sep 10, 2024, 2:18:00 AM9/10/24
to ima...@googlegroups.com

Hi,

Thank you for getting back to us.

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

IMA SDK

unread,
Sep 10, 2024, 12:03:40 PM9/10/24
to ima...@googlegroups.com
Hello all,

This is Jackson from the IMA SDK team replying to your issue. The team has been looking into some potential updates to the IMA SDK to would prevent the crash but only for Android API 26+. Would that be a meaningful portion of your app's traffic, or would it be preferable to have a more complete solution?
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJS6b:ref" (ADR-00243611)

Thanks,
 
Google Logo
Jackson Sui
IMA SDK Team


Hermawan Winata

unread,
Sep 10, 2024, 2:30:47 PM9/10/24
to Interactive Media Ads SDK
Hello Jackson,

Our app uses minSdkVersion 26 so that should be OK. Thank you for the good news.

IMA SDK

unread,
Sep 11, 2024, 10:33:39 AM9/11/24
to ima...@googlegroups.com
Hello Hermawan,

Thank you for the reply. I have shared this with the team, and will let you know about any progress on the issue through this thread.

Mike Bolaris

unread,
Nov 15, 2024, 5:04:25 AM11/15/24
to Interactive Media Ads SDK
Any updates on fixes for this issue? We're also struggling with our app crashing when the low memory killer kills the webview sandbox process. It would be great if our app could avoid crashing when LMK decides to kill the webview sandbox process.
We are currently running the com.google.ads.interactivemedia.v3:interactivemedia:3.33.0

11-11 09:49:53.023  3253  3253 E lowmemorykiller: Kill 'com.google.android.webview:sandboxed_process0:org.chromium.content.app.Sand' (6271), uid 99100, oom_adj 900 to free 105364kB
11-11 09:49:53.023  3253  3253 I lowmemorykiller: Reclaimed 105364kB at oom_adj 900
11-11 09:49:53.062  3524 19857 I ActivityManager: Process com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:4 (pid 6271) has died: cch CACC
11-11 09:49:53.063  3524 19857 W ActivityManager: Scheduling restart of crashed service com.tivo.hydra.app/org.chromium.content.app.SandboxedProcessService0:4 in 1000ms
11-11 09:49:53.328 24575 24575 E chromium: [ERROR:aw_browser_terminator.cc(165)] Renderer process (6271) crash detected (code -1).
11-11 09:49:53.350 24575 24575 E chromium: [ERROR:aw_browser_terminator.cc(113)] Render process (6271) kill (OOM or update) wasn't handed by all associated webviews, killing application.
11-11 09:49:53.789  3524  6478 I ActivityManager: Process com.tivo.hydra.app (pid 24575) has died: fore TOP 

Thanks,
Mike Bolaris

IMA SDK

unread,
Nov 18, 2024, 11:05:37 AM11/18/24
to mikebo...@gmail.com, ima...@googlegroups.com
Hello Mike,

I have checked with the engineering team working on the issue and will reply here when I have more information.

For the LMK webview sandbox issue, is this a new issue separate from the original webview issue? Do you have a reliable way to reproduce the issue?
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJS6b:ref" (ADR-00243611)

Thanks,
 
Google Logo
Jackson Sui
IMA SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
 

 



Mike Bolaris

unread,
Nov 19, 2024, 7:24:44 PM11/19/24
to Interactive Media Ads SDK

Hi Jackson,

Thank you for your response. I believe this is the same original WebView issue: "IMA SDK is causing the whole app to crash if a WebView render process crashes."
We see that once the IMA SDK is used to play an ad, killing the webview results in the entire app being killed, with the message "wasn't handled by all associated webviews, killing application."

Reproducing the Issue:

  • Using the latest ExoPlayer demo app, initiate ad playback with the IMA SDK.
  • Execute adb shell pkill -f webview:sandboxed_process to kill the WebView renderer (note this requires root access).
  • The demo app immediately crashes due to the renderer process not being handled.

Additional Observations:

  • When the Low Memory Killer (LMK) terminates the WebView sandbox process, the app only sometimes crashes. However, using adb shell pkill -f webview:sandboxed_process consistently crashes the app that used the IMA SDK, regardless of whether playback is ongoing at the time.

We can reproduce the same issue in our app, and it significantly impacts stability on devices under memory pressure when the LMK frequently terminates the WebView renderer.

11-19 15:16:41.146  3671  7334 I ActivityManager: Process com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0 (pid 27817) has died: fore BTOP
11-19 15:16:41.147  3671  3702 I libprocessgroup: Successfully killed process cgroup uid 99038 pid 27817 in 0ms
11-19 15:16:41.147 27731 27815 W cr_ChildProcessConn: onServiceDisconnected (crash or killed by oom): pid=27817 bindings:W  S
11-19 15:16:41.147  3671  7334 W ActivityManager: Scheduling restart of crashed service androidx.media3.demo.main/org.chromium.content.app.SandboxedProcessService0:0 in 1000ms
11-19 15:16:41.153  3897  3897 I Zygote  : Process 27817 exited due to signal 9 (Killed)
11-19 15:16:41.175 27731 27731 E chromium: [ERROR:aw_browser_terminator.cc(165)] Renderer process (27817) crash detected (code -1).
11-19 15:16:41.179 27731 27731 E chromium: [ERROR:aw_browser_terminator.cc(113)] Render process (27817) kill (OOM or update) wasn't handed by all associated webviews, killing application.
11-19 15:16:41.307  3384  3384 I Zygote  : Process 27731 exited due to signal 9 (Killed)
11-19 15:16:41.311  3671  3882 I ActivityManager: Process androidx.media3.demo.main (pid 27731) has died: fore TOP

We’re looking for a way for playback to fail gracefully while allowing our app to continue running—ideally by the IMA SDK handling onRenderProcessGone() internally.
We appreciate any further assistance you can provide on this.

Best regards,
Mike Bolaris

IMA SDK

unread,
Nov 20, 2024, 4:23:40 PM11/20/24
to mikebo...@gmail.com, ima...@googlegroups.com
Hello Mike,

Thank you for the reply. I've updated our internal thread with the info you have shared and will let you know when I have updates about the issue.

IMA SDK

unread,
Apr 4, 2025, 3:53:51 AMApr 4
to shin...@gmail.com, ima...@googlegroups.com
Hi,

We've an update. The issue has been fixed. 

Thanks,
 
Google Logo IMA SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-04 07:53:43Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02h0mxk:ref" (ADR-00159983)



Eugene Huzyk

unread,
Apr 4, 2025, 4:08:14 AMApr 4
to Interactive Media Ads SDK
Thank you so much for the update!

Hermawan Winata

unread,
Apr 4, 2025, 5:45:58 AMApr 4
to Interactive Media Ads SDK
Thank you for fixing this!

IMA SDK

unread,
Apr 4, 2025, 10:34:56 AMApr 4
to ima...@googlegroups.com
Hello all,

This is Jackson from the IMA SDK team. I wanted to clarify that we have identified a fix for this issue, and it will be available in the next Android IMA SDK version. I will update this thread once that release is live.

Thanks,
 
Google Logo
Jackson Sui
IMA SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-04 14:34:46Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02h0mxk:ref" (ADR-00159983)



IMA SDK

unread,
Apr 4, 2025, 10:37:11 AMApr 4
to ima...@googlegroups.com, mikebo...@gmail.com
Hello Mike,

I wanted to let you know that a fix for this issue has been identified by the team and will be available in the next Android release.

Thanks,
 
Google Logo
Jackson Sui
IMA SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-04 14:36:59Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02tJS6b:ref" (ADR-00243611)



Mike Bolaris

unread,
Apr 7, 2025, 2:09:37 AMApr 7
to Interactive Media Ads SDK
Great news! Looking forward to trying out the fix. 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages