I am using the latest version of AdWhirl to serve Ads from AdMob(+AdSense),InMobi,mdotm and Millennial Media. I am getting a lot of;
Exception class java.lang.NullPointerException
Source method AdWhirlLayout.handleAd()
Stack trace
java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:217)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:205)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:390)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
This is causing a large amount of force closing and upsetting my users, does anyone have any ideas what is causing this and how to fix.
Any help gratefully received.
Thanks
AdWhirl has had a new release since this exception. Is anybody still seeing these errors? This may have been some weird case where there was a bad configuration that causes a Ration object to be populated with null values, which caused the NPE when a string was formatted with one of these fields. All the fields in the ration have a value by default.
Related
On Google Play developer console I sometimes get crash reports that I don't understand at all. There is noting from my app code in the stack trace reported. Could anyone shed some light e.g. on this one?
java.lang.NullPointerException
at android.os.Parcel.readException(Parcel.java:1338)
at android.os.Parcel.readException(Parcel.java:1286)
at android.speech.tts.ITextToSpeechService$Stub$Proxy.setCallback(ITextToSpeechService.java:573)
at android.speech.tts.TextToSpeech$Connection.onServiceConnected(TextToSpeech.java:1278)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1125)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1142)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4945)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
It's clearly in some Text to Speech package, but how am I, the app author, resposible for this one? I do initialize TTS and my app is reading text aloud, but how can I fix such error?
Greg
here is your errors
ITextToSpeechService$Stub$Proxy.setCallback(ITextToSpeechService.java:573)
it's clearly !
I have a null pointer exception somewhere, but I am not sure where. All I have is this error:
java.lang.NullPointerException
at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:330)
at android.widget.AdapterView.checkFocus(AdapterView.java:700)
at android.widget.AdapterView$AdapterDataSetObserver.onInvalidated(AdapterView.java:823)
at android.widget.AbsListView$AdapterDataSetObserver.onInvalidated(AbsListView.java:5738)
at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:47)
at android.widget.BaseAdapter.notifyDataSetInvalidated(BaseAdapter.java:59)
at android.widget.ArrayAdapter$ArrayFilter.publishResults(ArrayAdapter.java:513)
at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:282)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4697)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
Would anyone have any ideas for how to debug this? I have not been able to reproduce it. It just sometimes happens and shows up in my crash logs.
Thanks!
Here's the code for ArrayAdapter: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/ArrayAdapter.java.
Assuming this is the right version, an NPE on line 330 would be caused if the adapter's dataset (i.e. the backing list or array) is null.
Hope that helps.
There is an exceptions, which I got in Android on drag.
Google doesnt know about this exception.
Question:
Any Idea, what to override to catch this exception? Something seems to hppen inside of the system, because all the listed classes are frameworks native classes.
Window Session Crash
java.lang.IllegalStateException: reportDropResult() by non-recipient
at com.android.server.wm.Session.reportDropResult(Session.java:307)
at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:369)
at com.android.server.wm.Session.onTransact(Session.java:111)
at android.os.Binder.execTransact(Binder.java:320)
at dalvik.system.NativeStart.run(Native Method)
FATAL EXCEPTION: main
java.lang.IllegalStateException: reportDropResult() by non-recipient
at android.os.Parcel.readException(Parcel.java:1329)
at android.os.Parcel.readException(Parcel.java:1275)
at android.view.IWindowSession$Stub$Proxy.reportDropResult(IWindowSession.java:900)
at android.view.ViewRoot.handleDragEvent(ViewRoot.java:3015)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2164)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
There is an exceptions, which I got in Android on drag. Google doesnt know about this exception.
Since I can't find a reportDropResult() in the Android 2.3 source, I am guessing that this is from the new drag-and-drop framework introduced with Honeycomb.
Any Idea, what to override to catch this exception?
You can't override anything to catch that exception. To catch unhandled exceptions, use Thread and setDefaultUncaughtExceptionHandler().
I received this error twice in the last three days on different devices. I do not use WebView at all in my app so I am a bit confused.
The only thing I can think of is AdMob but wouldn't that show up in the stack trace?
Here is the stack trace:
java.lang.NullPointerException at
android.webkit.WebView.stopLoading(WebView.java:1842) at
c$a.run(Unknown Source) at
android.os.Handler.handleCallback(Handler.java:587) at
android.os.Handler.dispatchMessage(Handler.java:92) at
android.os.Looper.loop(Looper.java:143) at
android.app.ActivityThread.main(ActivityThread.java:4914) 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:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at
dalvik.system.NativeStart.main(Native Method)
Update: In addition to the link Arhimed provided here is a link where an AdMob rep is discussing this as well
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/H3lkDEmburw
From what you said I am pretty sure this is an AdMob issue. The reason you don't see any "AdMob" occurrencies in the log is that AdMob comes as an obfuscated library jar. So c$a.run(Unknown Source) is a log enrty produced by an obfuscated code.
UPDATE:
This IS really related to AdMob. There is a related SO question: Android uncatchable NullPointerException
I'm seeing this exception in my android Market Developer Console -->Crash errors
java.lang.NullPointerException
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:398)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:366)
at android.widget.AbsListView.obtainView(AbsListView.java:1943)
at android.widget.ListPopupWindow$DropDownListView.obtainView(ListPopupWindow.java:1143)
at android.widget.ListView.makeAndAddView(ListView.java:1756)
at android.widget.ListView.fillDown(ListView.java:656)
at android.widget.ListView.fillSpecific(ListView.java:1314)
at android.widget.ListView.layoutChildren(ListView.java:1587)
at android.widget.AbsListView.onLayout(AbsListView.java:1794)
at android.view.View.layout(View.java:9330)
at android.view.ViewGroup.layout(ViewGroup.java:3795)
at android.widget.FrameLayout.onLayout(FrameLayout.java:400)
at android.view.View.layout(View.java:9330)
at android.view.ViewGroup.layout(ViewGroup.java:3795)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1201)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1944)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:126)
at android.app.ActivityThread.main(ActivityThread.java:3998)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Here are the things which i don't understand about this error:
Where is it coming from (i don't see any reference to my classes in this trace)?
Does it mean the application shuts down because of this errors?
What is the mechanism by which this error gets logged in market place?
Note : there are no user messages in the error log.
Looks like either it expects a TextView in your layout which is not there, or an item in your list is null. The relevant source is at http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3.5_r1/android/widget/ArrayAdapter.java#ArrayAdapter.createViewFromResource%28int%2Candroid.view.View%2Candroid.view.ViewGroup%2Cint%29, line 398 corresponds to line 355 on this page.