Android - exception from an AsynchTask call
- by GeekedOut
I have an Activity that makes a remote server call and tries to populate a list. The call to the server works fine, and the call returns some JSON which is good.
But then the system throws this exception:
04-06 18:43:19.626: D/AndroidRuntime(2564): Shutting down VM
04-06 18:43:19.626: W/dalvikvm(2564): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
04-06 18:43:19.686: E/AndroidRuntime(2564): FATAL EXCEPTION: main
04-06 18:43:19.686: E/AndroidRuntime(2564): java.lang.NullPointerException
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.AbsListView.obtainView(AbsListView.java:2033)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ListView.onMeasure(ListView.java:1155)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureVertical(LinearLayout.java:812)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.os.Handler.dispatchMessage(Handler.java:99)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.os.Looper.loop(Looper.java:137)
04-06 18:43:19.686: E/AndroidRuntime(2564): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-06 18:43:19.686: E/AndroidRuntime(2564): at java.lang.reflect.Method.invokeNative(Native Method)
04-06 18:43:19.686: E/AndroidRuntime(2564): at java.lang.reflect.Method.invoke(Method.java:511)
04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-06 18:43:19.686: E/AndroidRuntime(2564): at dalvik.system.NativeStart.main(Native Method)
Why would this happen? It doesn't point to any of my code so its a bit strange.
the protected void onPostExecute(String result) never gets called on the callback.
Thanks!