0

Updated to the latest version of AdWhirl and AdMob SDK but getting a known error from the AdMob SDK in Android 2.1-update1. Found in this thread https://groups.google.com/forum/#!topic/google-admob-ads-sdk/cNxRgIUHJH0

but it refers to only and AdMob fix not AdWhirl any clue what changes can be made to the AdWhirl SDK to fix this?

Thanks In Advance!

java.lang.NullPointerException
    at android.webkit.WebView.getSettings(WebView.java:2791)
    at android.webkit.WebView.onWindowFocusChanged(WebView.java:3616)
    at android.view.View.dispatchWindowFocusChanged(View.java:3764)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:754)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:758)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1819)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4370)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    at dalvik.system.NativeStart.main(Native Method)

How about this one:

java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:227)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:215)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:410)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)

2 Answers2

0

The issue is not in the AdWhirl code, or even the AdMob code. This is a NullPointerException in the Android WebView, and there is no known workaround for the AdMob/AdWhirl code. This shouldn't be happening that often, but if it really is a deal breaker, you may want to turn down the number of requests you're sending to AdMob.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
  • The line numbers from the exception above don't seem to coordinate to the [default](http://code.google.com/p/adwhirl/source/browse/src/com/adwhirl/AdWhirlLayout.java?repo=sdk-android#227) source of AdWhirl (for example, line 410 of AdWhirlLayout.java is in ViewAdRunnable, not HandleAdRunnable where your exception comes from). Did you modify the source, and if so, can you post your handleAd method? – Eric Leichtenschlag Feb 13 '12 at 23:39
  • Hi its this line in handleAd nextRation.key2); which has not been modified the only changes made where to rollover if the AdwhirlLayout view is gone. – user1074300 Feb 14 '12 at 04:03
  • Ok, I've seen another report of this problem. It's definitely on AdWhirl's end, but I'm not sure how this exception is occurring, because there is a null check on nextRation prior to looking at key2. Any idea what the the ration looks like prior to the crash? – Eric Leichtenschlag Feb 14 '12 at 19:58
0

Yes, I also have this problem.

My workaround: extend AdWhirlLayout, override dispatchWindowFocusChanged and every other method that have this exception occurring and catch the exception.

Danail
  • 10,443
  • 12
  • 54
  • 76