3.16 and 3.17 crashes in libwebviewchromium.so

3.16 and 3.17 crashes in libwebviewchromium.so
0

#1

We are seeing tons of these crashes in Play Console in 3.16 and also 3.17. We don’t have anything that uses the webview. Not sure why it would crash here :frowning:

Any ideas anyone?

Huawei MediaPad (hwt1701), Android 4.4
Report 1

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.company.mygame <<<

backtrace:
  #00  pc 00000000001a2f28  /system/lib/libwebviewchromium.so
  #01  pc 000000000001e74c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #02  pc 000000000004f9fd  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+484)
  #03  pc 0000000000027b28  /system/lib/libdvm.so
  #04  pc 000000000002f130  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
  #05  pc 000000000002c614  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+188)
  #06  pc 0000000000062d39  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+340)
  #07  pc 000000000004e6f9  /system/lib/libdvm.so
  #08  pc 00000000001a30ed  /system/lib/libwebviewchromium.so
  #09  pc 00000000001a3bdb  /system/lib/libwebviewchromium.so
  #10  pc 000000000019ad83  /system/lib/libwebviewchromium.so
  #11  pc 000000000019c975  /system/lib/libwebviewchromium.so
  #12  pc 000000000019a791  /system/lib/libwebviewchromium.so
  #13  pc 00000000002df7e5  /system/lib/libwebviewchromium.so
  #14  pc 00000000002e0ea9  /system/lib/libwebviewchromium.so
  #15  pc 00000000002df4d3  /system/lib/libwebviewchromium.so
  #16  pc 00000000002dfbc3  /system/lib/libwebviewchromium.so
  #17  pc 0000000000349211  /system/lib/libwebviewchromium.so
  #18  pc 0000000000352e3f  /system/lib/libwebviewchromium.so
  #19  pc 000000000034e547  /system/lib/libwebviewchromium.so
  #20  pc 0000000000df8253  /system/lib/libwebviewchromium.so
  #21  pc 0000000000b3861f  /system/lib/libwebviewchromium.so
  #22  pc 0000000000b6eb8d  /system/lib/libwebviewchromium.so
  #23  pc 0000000000b685af  /system/lib/libwebviewchromium.so
  #24  pc 0000000000b67c65  /system/lib/libwebviewchromium.so
  #25  pc 0000000000b45447  /system/lib/libwebviewchromium.so
  #26  pc 0000000000b454d3  /system/lib/libwebviewchromium.so
  #27  pc 0000000000b4d167  /system/lib/libwebviewchromium.so
  #28  pc 0000000000b697c5  /system/lib/libwebviewchromium.so
  #29  pc 0000000000b69a59  /system/lib/libwebviewchromium.so
  #30  pc 0000000000b65cd7  /system/lib/libwebviewchromium.so
  #31  pc 0000000000b658e7  /system/lib/libwebviewchromium.so

#2

I am still using cocos v3.12 and I also had a lot of same crashes. 99% of them were on android 4.… The only solution I found was to disable hardware acceleration for android 4.. After adding this “fix” I see no crashes.


#3

@kds GREAT!

Did you disable hardware acceleration on the application or activity level?
https://developer.android.com/guide/topics/graphics/hardware-accel

I am thinking turning hardware acceleration off at activity level and toggle that on/off base on android 4 or not.
What you think?

<application android:hardwareAccelerated="true">
    <activity ... />
    <activity android:hardwareAccelerated="false" />
</application>

getWindow().setFlags(
    WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
    WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);

#4

I am using admob and this is the only place where webview is used in my games. So, I disable hardware acceleration only for “com.google.android.gms.ads.AdActivity”. I am doing it in manifest through resources.


#5

@kds Thank you!


#6

No problem, let me know if it helped.


#7

@kds Thanks, I will!

For others here’s what we did https://stackoverflow.com/questions/13850259/is-there-a-way-to-disable-hardware-acceleration-only-for-android-4-0-3


#8

Which version of play-services-ads are you using? I’m experiencing this with 11.8


#9

We haven’t deploy the fix yet so not sure if it work or not. I will get back when this happen.

As for play-services-ads it’s the current version that comes with SdkBox.


#10

I’m finding it impossible to specifically turn hardware accelerated rendering off for com.google.android.gms.ads.AdActivity using Android Manifest. At best, I can turn it off for the entire application, but even then Interstitial Ads still uses Accelerated Rendering.

I tested this, by Developer Options (hidden android menu) -> Show GPU View updates.
This will flick the screen where the GPU renders.

I’m just disabling admob for 4.4 and seeing if the issues persists. Then I’ll try Google Play Game Services.


#11

@wow4201 did any solution work for you?


#12

I disabled admob from rendering on API 19 (4.4 kitkat) the issue resolved (100% confirmed) 50k installs. I’m trying to understand why this happens, probably memory leak related.
So this issue in particular in my case is caused by admob. Which kind of sucks cause that’s 14%+ less revenue. I’m not sure if it’s Banner or Inter or both.


#13

@wow4201 first of all that’s AWESOME you found a fix and sucks in revenue man! You mind sharing how you disabled admob for API 19? I tested the other fix and doesn’t seem to work for us.

Thanks!


#14

I don’t code with cocos2d I use react-native. I just insert logic in my code to prevent rendering or triggering admob inter. Good luck! I just found this forum by searching this crash


#15

@vkreal2 Hmm… that is strange it doesn’t work for you. I am disabling hardware acceleration in this way:

<activity android:name="com.google.android.gms.ads.AdActivity" android:hardwareAccelerated="@bool/isHardwareAccelerated" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />

where “isHardwareAccelerated” is set in proper res values, e.g. values-v14 to values-v20 (I am disabling hw for admob for all androdi 4.x.).

After this “fix” I don’t see any crash in libwebviewchromium.so.

I hoped you could confirm it :wink:


#16

@kds Yes I will try to confirm and get back. I am using combination of SDKBOX admob plugin and a custom one I built. Maybe the SDKBOX also need android:hardwareAccelerated to be set false.

@yinjimmy do you how I can set android:hardwareAccelerated for com.google.android.gms.ads.AdActivity that SDKBOX using for Admob plugin?

Thanks!


#17

as kds said. https://stackoverflow.com/a/22643710/5443510

$ git diff proj.android/AndroidManifest.xml
diff --git a/sample/admob/proj.android/AndroidManifest.xml b/sample/admob/proj.android/AndroidManifest.xml
index 8607f7d86..b041c8375 100644
--- a/sample/admob/proj.android/AndroidManifest.xml
+++ b/sample/admob/proj.android/AndroidManifest.xml
@@ -34,7 +34,8 @@
         <!--Include the AdActivity configChanges and theme. -->
         <activity android:name="com.google.android.gms.ads.AdActivity"
             android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
-            android:theme="@android:style/Theme.Translucent" />
+            android:theme="@android:style/Theme.Translucent"
+            android:hardwareAccelerated="@bool/isHardwareAccelerated" />

         <!-- adcolony -->
         <activity android:name="com.jirbo.adcolony.AdColonyFullscreen"
$ cat proj.android/res/values-v14/bools.xml
<resources>
    <bool name="isHardwareAccelerated">false</bool>
</resources>
$ cat proj.android/res/values-v16/bools.xml
<resources>
    <bool name="isHardwareAccelerated">true</bool>
</resources>
$ cat proj.android/res/values/bools.xml
<resources>
    <bool name="isHardwareAccelerated">true</bool>
</resources>

but need to test.


#18

@kds Looks like the fix didn’t work for us. Disabled hardware acceleration from values-14 to values-20

Today, 12:50 PM on app version 1005
Hisense U988 (U988), Android 4.4
Report 1 of 1
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.company.mygame <<<

backtrace:
  #00  pc 0000000000194ad0  /system/lib/libwebviewchromium.so
  #01  pc 000000000002038c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #02  pc 0000000000051017  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
  #03  pc 0000000000029820  /system/lib/libdvm.so
  #04  pc 0000000000030cac  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
  #05  pc 000000000002e344  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #06  pc 000000000006347d  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
  #07  pc 000000000004fd75  /system/lib/libdvm.so
  #08  pc 0000000000194c8d  /system/lib/libwebviewchromium.so
  #09  pc 000000000019577b  /system/lib/libwebviewchromium.so
  #10  pc 000000000018cc2b  /system/lib/libwebviewchromium.so
  #11  pc 000000000018e5a9  /system/lib/libwebviewchromium.so
  #12  pc 000000000018c5e9  /system/lib/libwebviewchromium.so
  #13  pc 00000000002d0e15  /system/lib/libwebviewchromium.so
  #14  pc 00000000002d24d9  /system/lib/libwebviewchromium.so
  #15  pc 00000000002d0b03  /system/lib/libwebviewchromium.so
  #16  pc 00000000002d11f3  /system/lib/libwebviewchromium.so
  #17  pc 000000000033a75d  /system/lib/libwebviewchromium.so
  #18  pc 00000000003443af  /system/lib/libwebviewchromium.so
  #19  pc 000000000033faa7  /system/lib/libwebviewchromium.so
  #20  pc 0000000000dd19fb  /system/lib/libwebviewchromium.so
  #21  pc 0000000000b15f13  /system/lib/libwebviewchromium.so
  #22  pc 0000000000b4bbdb  /system/lib/libwebviewchromium.so
  #23  pc 0000000000b457e3  /system/lib/libwebviewchromium.so
  #24  pc 0000000000b44e8d  /system/lib/libwebviewchromium.so
  #25  pc 0000000000b22ad3  /system/lib/libwebviewchromium.so
  #26  pc 0000000000b22b5f  /system/lib/libwebviewchromium.so
  #27  pc 0000000000b2a61f  /system/lib/libwebviewchromium.so
  #28  pc 0000000000b469cd  /system/lib/libwebviewchromium.so
  #29  pc 0000000000b46c61  /system/lib/libwebviewchromium.so
  #30  pc 0000000000b42f4b  /system/lib/libwebviewchromium.so
  #31  pc 0000000000b42b67  /system/lib/libwebviewchromium.so


#19

how to reproduce this issue?
how many banner ad ?
could you plz share your sdkbox_config.json ?

As I know, too many webviews will cause this crash.

Thanks,


#20
  1. how to reproduce this issue? We only see this on Play console.

  2. how many banner ad ? 1

  3. could you plz share your sdkbox_config.json ?

    {
    “android”: {
    “AdMob”: {
    “test”: false,
    “ads”: {
    “gameover”: {
    “type”: “interstitial”,
    “id”: “ca-app-pub-3024806986096104/1716792476”
    },
    “home”: {
    “width”: 0,
    “type”: “banner”,
    “id”: “ca-app-pub-3024806986096104/7763326074”,
    “alignment”: “bottom”,
    “height”: 0
    },
    “gameover2”: {
    “type”: “interstitial”,
    “id”: “ca-app-pub-3024806986096104/9468732477”
    },
    “home2”: {
    “width”: 0,
    “type”: “banner”,
    “id”: “ca-app-pub-3024806986096104/3422198876”,
    “alignment”: “bottom”,
    “height”: 0
    },
    “RewardedVideo”:{
    “id”:“ca-app-pub-3024806986096104/8936675276”,
    “type”:“rewarded_video”
    }
    }
    }
    },
    “ios”: {
    “AdMob”: {
    “test”: false,
    “ads”: {
    “gameover”: {
    “type”: “interstitial”,
    “id”: “ca-app-pub-3024806986096104/1716792476”
    },
    “home”: {
    “width”: 0,
    “type”: “banner”,
    “id”: “ca-app-pub-3024806986096104/7763326074”,
    “alignment”: “bottom”,
    “height”: 0
    },
    “gameover2”: {
    “type”: “interstitial”,
    “id”: “ca-app-pub-3024806986096104/9468732477”
    },
    “home2”: {
    “width”: 0,
    “type”: “banner”,
    “id”: “ca-app-pub-3024806986096104/3422198876”,
    “alignment”: “bottom”,
    “height”: 0
    },
    “RewardedVideo”:{
    “id”:“ca-app-pub-3024806986096104/8936675276”,
    “type”:“rewarded_video”
    }
    }
    }
    }
    }