Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AdView Causing Chrome Crash?

Tags:

android

admob

I have an adview in one of my activitites. When I go to this activity, I get a dialog on the emulator telling me Chrome has stopped and the ad doesn't show anything.

I've checked over the code itself and I'm fairly sure it matches what it should -

Activity.xml

<com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            ads:adSize="BANNER"
            ads:adUnitId="@string/banner_ad_unit_id"></com.google.android.gms.ads.AdView>

Activity.java

mAdView = (AdView) findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder().build();
        mAdView.loadAd(adRequest);

Here is the logcat -

09-08 09:26:47.779 5777-5777/? D/EGL_emulation: eglCreateContext: 0x872ca5e0: maj 2 min 0 rcv 2
09-08 09:26:47.783 5777-5777/? D/EGL_emulation: eglMakeCurrent: 0x872ca5e0: ver 2 0 (tinfo 0x8379e7b0)
09-08 09:26:47.784 5892-5892/? E/asset: setgid: Operation not permitted
09-08 09:26:47.795 5878-5878/? W/ResourceType: Entry identifier 0xc is larger than entry count 0x8
09-08 09:26:47.795 5878-5878/? D/AndroidRuntime: Shutting down VM
09-08 09:26:47.795 5878-5878/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.android.chrome:sandboxed_process0, PID: 5878
                                                 android.content.res.Resources$NotFoundException: Array resource ID #0x7f03000c
                                                     at android.content.res.Resources.obtainTypedArray(Resources.java:617)
                                                     at android.content.res.Resources.preloadFonts(Resources.java:379)
                                                     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5815)
                                                     at android.app.ActivityThread.-wrap1(Unknown Source:0)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
                                                     at android.os.Handler.dispatchMessage(Handler.java:105)
                                                     at android.os.Looper.loop(Looper.java:164)
                                                     at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                     at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:121)
09-08 09:26:47.799 1584-1600/? I/ActivityManager: Showing crash dialog for package com.androidandyuk.autobuddy u0
09-08 09:26:47.825 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.826 1584-2280/? I/OpenGLRenderer: Initialized EGL, version 1.4
09-08 09:26:47.826 1584-2280/? D/OpenGLRenderer: Swap behavior 1
09-08 09:26:47.826 1584-2280/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-08 09:26:47.826 1584-2280/? D/OpenGLRenderer: Swap behavior 0
09-08 09:26:47.842 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.842 1584-2280/? D/EGL_emulation: eglCreateContext: 0xa44a4be0: maj 2 min 0 rcv 2
09-08 09:26:47.848 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.849 1584-2280/? D/EGL_emulation: eglMakeCurrent: 0xa44a4be0: ver 2 0 (tinfo 

On my Pixel XL, it doesn't crash, but no ad is shown, so I guess something isn't right?

like image 625
AndyCr15 Avatar asked Sep 08 '17 08:09

AndyCr15


People also ask

How to fix Google Chrome keep crashing on Windows 11?

First up, open Google Chrome on your PC and go to Settings >>More Tools >> Clear Browsing data. A list of items will appear that you can select or unselect such as “Password” and finally hit “Clear Data”. Restart Google Chrome and check if the crashing issue on Windows 11 is gone or not.

How to fix Google Chrome not responding on Windows 10?

Press the keyboard shortcut Ctrl + Shift + Esc to open Task Manager. From the list of apps, select Google Chrome and right-click on it. Click on End task .

How to fix Google Chrome not loading on Windows 10?

If your PC has low RAM like 2 to 4 GB and you have multiple heavy programs running, your computer will cause even Chrome to fail to load. This is because your computer’s capacity is unable to process all apps and programs at once. So, to fix this problem, you can start by closing all unwanted tabs from your Chrome.

How to fix Google Chrome won’t close?

Press the keyboard shortcut Alt + F4 keys to exit Chrome. Now, restart Chrome. If you’re on a Mac, you can press the Command key + Q . You can also try force-ending Chrome from the task manager. Usually, this simple method helps us to close Chrome properly. Press the keyboard shortcut Ctrl + Shift + Esc to open Task Manager.


1 Answers

We had the same crash in our app. A temporary solution was to disable the use of the preloaded_fonts tag in AndroidManifest.xml.

like image 94
Jürgen Obernolte Avatar answered Oct 03 '22 12:10

Jürgen Obernolte