DFP (google-ads) related crashes as seen in reports

544 views
Skip to first unread message

Olexandr Tereshchuk

unread,
Apr 11, 2016, 12:29:32 PM4/11/16
to Google Mobile Ads SDK Developers
Hi,
all those crashes are gathered from different Google Play Services versions from 6.x to 8.4.0
It's just informative post:


Crash 1
Fatal Exception: java.lang.IllegalArgumentException: Invalid NativeAdManager type. Found: com.google.android.gms.ads.internal.f; Required: NativeAdManager.
       at maps.at.e.a(:com.google.android.gms.alldynamite:91)
       at com.google.android.gms.ads.internal.c$3.run(:com.google.android.gms.alldynamite:215)
       at android.os.Handler.handleCallback(Handler.java:615)


Crash 2
Fatal Exception: java.lang.IncompatibleClassChangeError: com/google/android/gms/internal/fh
       at com.google.android.gms.internal.f$f.b(Unknown Source)
       at com.google.android.gms.internal.f.a(Unknown Source)
       at com.google.android.gms.internal.i.a(Unknown Source)
       at com.google.android.gms.internal.i.a(Unknown Source)
       at com.google.android.gms.internal.i.a(Unknown Source)
       at com.google.android.gms.internal.bz.aB(Unknown Source)
       at com.google.android.gms.internal.ct$1.run(Unknown Source)
       at com.google.android.gms.internal.cu$1.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)


Crash 3
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.merriamwebster/com.google.android.gms.ads.AdActivity}: java.lang.NullPointerException
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498)
       at android.app.ActivityThread.access$900(ActivityThread.java:179)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5641)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
       at ack.a(SourceFile:70)
       at acm.a(SourceFile:260)
       at acz.onTransact(SourceFile:58)
       at android.os.Binder.transact(Binder.java:361)
       at com.google.android.gms.internal.ck$a$a.onCreate(Unknown Source)
       at com.google.android.gms.ads.AdActivity.onCreate(Unknown Source)
       at android.app.Activity.performCreate(Activity.java:5484)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498)
       at android.app.ActivityThread.access$900(ActivityThread.java:179)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5641)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
       at dalvik.system.NativeStart.main(NativeStart.java)


Crash 4
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.merriamwebster/com.google.android.gms.ads.AdActivity}: java.lang.NullPointerException
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498)
       at android.app.ActivityThread.access$900(ActivityThread.java:179)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5641)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
       at acm.a(SourceFile:215)
       at acz.onTransact(SourceFile:58)
       at android.os.Binder.transact(Binder.java:361)
       at com.google.android.gms.internal.ck$a$a.onCreate(Unknown Source)
       at com.google.android.gms.ads.AdActivity.onCreate(Unknown Source)
       at android.app.Activity.performCreate(Activity.java:5484)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2498)
       at android.app.ActivityThread.access$900(ActivityThread.java:179)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5641)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1288)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
       at dalvik.system.NativeStart.main(NativeStart.java)


Crash 5
Fatal Exception: java.lang.NoSuchFieldError: MILLISECONDӀ MINUTES
       at maps.y.a$a.run(:com.google.android.gms.alldynamite:112)


Crash 6
Fatal Exception: java.lang.NullPointerException
       at zo.a(SourceFile:172)
       at aeh.a(SourceFile:120)
       at afw.run(SourceFile:14)
       at afy.run(SourceFile:30)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:864)


Crash 7
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.View com.google.android.gms.ads.internal.formats.h.e()' on a null object reference
       at maps.aa.a$b.a(:com.google.android.gms.alldynamite:672)
       at maps.aa.a.a(:com.google.android.gms.alldynamite:262)
       at maps.aa.a.d(:com.google.android.gms.alldynamite:224)
       at maps.aa.a$2.a(:com.google.android.gms.alldynamite:348)
       at maps.bi.c.a(:com.google.android.gms.alldynamite:794)
       at maps.bi.g$1.run(:com.google.android.gms.alldynamite:45)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Vu Chau (Mobile Ads SDK Team)

unread,
Apr 11, 2016, 2:10:43 PM4/11/16
to Google Mobile Ads SDK Developers
Hi Olexandr,

Thanks for the heads-up! I'll relay the crash logs to the rest of the team and we'll see what we can do.  In the meantime, if you have more information regarding the steps that lead to these crashes, that'd rock.

Vu Chau
Mobile Ads SDK Team

Olexandr Tereshchuk

unread,
Apr 11, 2016, 3:02:43 PM4/11/16
to google-adm...@googlegroups.com
Unfortunately, I can provide precise information only about Crash 7
Application use 'com.google.android.gms:play-services-ads:8.4.0'
To load DFP ads:

        final AdLoader loader = new AdLoader.Builder(getService().getApplicationContext(), AD_UNIT_ID)
            .forCustomTemplateAd(AD_UNIT_TEMPLATE_ID, new NativeCustomTemplateAd.OnCustomTemplateAdLoadedListener() {
              @Override
              public void onCustomTemplateAdLoaded(final NativeCustomTemplateAd dfpCustomAd) {
                if (!subscriber.isUnsubscribed()) {
                  subscriber.onNext(dfpCustomAd);
                  subscriber.onCompleted();
                }
              }
            }, null)
            .withAdListener(new DreamAdListener(tabletState.getShortName() + " : " + AD_UNIT_ID) {
              @Override
              public void onAdFailedToLoad(int errorCode) {
                if (!subscriber.isUnsubscribed()) {
                  subscriber.onError(new DfpLoadingException(errorCode, getTarget()));
                }
              }
            })
            .build();

        PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder();
        tabletState.addTargetingOptions(builder);
        loader.loadAd(builder.build());



And display it:

    NativeAd.Image image = keyprDfpAd.getImage(DFP_AD_IMAGE_ASSET);
    if (image == null) {
      getAnalytics().serverError("Tablet downloaded dfp ad without image asset. Ad should have image under \""
          + DFP_AD_IMAGE_ASSET + "\" key. Available asset keys: " + String.valueOf(dfpAd.getAvailableAssetNames()))
          .log();
      return;
    }
    
    ImageView promoImage = ...;
    promoImage.setImageDrawable(image.getDrawable());
    dfpAd.recordImpression();
    promoImage.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
        dfpAd.performClick(DFP_AD_IMAGE_ASSET);
      }
    });



--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/ADIVoHJ1xdE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Olexandr Tereshchuk

unread,
Apr 11, 2016, 3:05:15 PM4/11/16
to google-adm...@googlegroups.com
For Crashes 1 - 6 we use variety of google-ads versions from 6.x to 8.4.0
And simply show PublisherAdView:

  <com.google.android.gms.ads.doubleclick.PublisherAdView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:background="@android:color/white"
      android:tag="ad"
      android:layerType="software"
      ads:adSizes="@string/banner_size"
      ads:adUnitId="@string/ad_banner_unit_id"/>


And PublisherInterstitialAd:
  public boolean showInterstitialAd(final Activity activity) {
    // Create the interstitial
    final PublisherInterstitialAd interstitial = new PublisherInterstitialAd(activity);
    interstitial.setAdUnitId(activity.getString(R.string.ad_interstitial_unit_id));

    // Set Ad Listener to use the callbacks below
    interstitial.setAdListener(new InterstitialAdListener(interstitial));

    try {
      // Begin loading your interstitial
      final PublisherAdRequest.Builder interstitialAdRequestBuilder = buildAdRequest();
      interstitial.loadAd(interstitialAdRequestBuilder.build());
      return true;
    } catch (final Throwable t) {
      //rooted device
      if (interstitial.getAdListener() != null) {
        interstitial.getAdListener().onAdFailedToLoad(AdRequest.ERROR_CODE_INTERNAL_ERROR);
      }
    }

    return false;
  }

Vu Chau (Mobile Ads SDK Team)

unread,
Apr 11, 2016, 5:14:16 PM4/11/16
to Google Mobile Ads SDK Developers
Hi Olexandr,

Do you also have the versions of the local Google Play services on the devices for any of those crashes?

Vu Chau
Mobile Ads SDK Team

To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Olexandr Tereshchuk

unread,
Apr 12, 2016, 7:09:18 AM4/12/16
to google-adm...@googlegroups.com
Crash 7 happens on local Google Play Services 8.7.03 (26451101-236)
Crash 1 - 6 are from user crash reports and unfortunately does not contain such information 

To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/ADIVoHJ1xdE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

Yasin razlık

unread,
May 15, 2016, 3:18:51 PM5/15/16
to Google Mobile Ads SDK Developers
I also see Crash 7 in my crash logs. As far as I observed, this happens more frequently when I try to load more than 1 ad at the same time(I have a viewpager like a slider banner and I try to load more than 6 ads concurrently). Any progress on that issue?

Vu Chau (Mobile Ads SDK Team)

unread,
May 16, 2016, 9:39:38 AM5/16/16
to Google Mobile Ads SDK Developers
Hi Yasin,

Can you send us some code snippets?  If you are loading multiple ads in parallel, are you doing so on background threads?

Vu Chau
Mobile Ads SDK Team

mmccl...@twobitlabs.com

unread,
Aug 4, 2016, 2:36:06 PM8/4/16
to Google Mobile Ads SDK Developers
Seeing a crash similar to Crash 7 in Play Services 9.2.0. Not sure if this has any bearing, but we're also loading multiple ads. This crash was not occurring on 7.8.0.

I couldn't find a bug report for this issue. Am I missing it?

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.View com.google.android.gms.ads.internal.formats.h.e()' on a null object reference
       at com.google.android.gms.ads.internal.activeview.g.a(:com.google.android.gms.DynamiteModulesA:691)
       at com.google.android.gms.ads.internal.activeview.a.a(:com.google.android.gms.DynamiteModulesA:3312)
       at com.google.android.gms.ads.internal.activeview.c.a(:com.google.android.gms.DynamiteModulesA:1234)
       at com.google.android.gms.ads.internal.webview.c.a(:com.google.android.gms.DynamiteModulesA:865)
       at com.google.android.gms.ads.internal.webview.t.run(:com.google.android.gms.DynamiteModulesA:45)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:158)
       at android.app.ActivityThread.main(ActivityThread.java:7224)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Mark McClelland

unread,
Aug 4, 2016, 3:05:25 PM8/4/16
to google-adm...@googlegroups.com
This appears to be the same issue: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/jXQW4gwUEDs as the crash I just posted.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/ADIVoHJ1xdE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Vu Chau (Mobile Ads SDK Team)

unread,
Aug 4, 2016, 5:08:21 PM8/4/16
to Google Mobile Ads SDK Developers
Hi Mark,

The one on the forum thread you linked is a different stack trace (Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.View xq.e()' on a null object reference).

Can you update to Google Play services v9.4.0, recompile your app, and report back on whether the crash should subside?  V9.4.0 has resolved a large number of this and similar crashes.

Vu Chau
Mobile Ads SDK Team

Fabian Baez

unread,
Aug 29, 2016, 9:29:55 AM8/29/16
to Google Mobile Ads SDK Developers
I'm have the same issue in Google Play services v9.4.0.

Fatal Exception: java.lang.NullPointerException
       at com.google.android.gms.ads.internal.activeview.g.a(:com.google.android.gms.DynamiteModulesA:691)
       at com.google.android.gms.ads.internal.activeview.a.a(:com.google.android.gms.DynamiteModulesA:3312)
       at com.google.android.gms.ads.internal.activeview.c.a(:com.google.android.gms.DynamiteModulesA:1234)
       at com.google.android.gms.ads.internal.webview.c.a(:com.google.android.gms.DynamiteModulesA:865)
       at com.google.android.gms.ads.internal.webview.t.run(:com.google.android.gms.DynamiteModulesA:45)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:146)
       at android.app.ActivityThread.main(ActivityThread.java:5602)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
       at dalvik.system.NativeStart.main(NativeStart.java)
To post to this group, send email to google-adm...@googlegroups.com.

Vu Chau (Mobile Ads SDK Team)

unread,
Aug 29, 2016, 2:19:25 PM8/29/16
to Google Mobile Ads SDK Developers
Hi Fabian,

Could you share some other details (which kind of ad you are using, which ad network, affected Android API versions, and devices et al.)?
Are you able to reproduce the crash locally or are you receiving those reports from your users?

Thanks,

Vu Chau
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages