amitbatajoo / opensocial-java-client

Automatically exported from code.google.com/p/opensocial-java-client
Apache License 2.0
0 stars 0 forks source link

NullPointerException when network fails #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version: 20090402 on Android Cupcake (on emulator)

See OpenSocialHttpClient line 118. In the catch block we cannot assume that
connection is non-null.

07-27 13:02:28.740: ERROR/AndroidRuntime(839): Uncaught handler: thread
main exiting due to uncaught exception
07-27 13:02:28.771: ERROR/AndroidRuntime(839): java.lang.NullPointerException
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialHttpClient.send(OpenSocialHttpClient.java:118)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialHttpClient.execute(OpenSocialHttpClient.java:70)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialBatch.submitRpc(OpenSocialBatch.java:142)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialBatch.send(OpenSocialBatch.java:102)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialClient.fetchPeople(OpenSocialClient.java:440)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialClient.fetchFriends(OpenSocialClient.java:190)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
org.opensocial.client.OpenSocialClient.fetchFriends(OpenSocialClient.java:168)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.google.android.apps.orkut.provider.FriendsProvider.refresh(FriendsProvider.j
ava:93)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.google.android.apps.orkut.activities.OrkutActivity.onOptionsItemSelected(Ork
utActivity.java:222)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.app.Activity.onMenuItemSelected(Activity.java:2085)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java
:820)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:139)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:81
3)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:519)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.ja
va:122)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.view.View.onTouchEvent(View.java:3828)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.widget.TextView.onTouchEvent(TextView.java:6291)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.view.View.dispatchTouchEvent(View.java:3368)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneW
indow.java:1691)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.os.Handler.dispatchMessage(Handler.java:99)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.os.Looper.loop(Looper.java:123)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
java.lang.reflect.Method.invokeNative(Native Method)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
java.lang.reflect.Method.invoke(Method.java:521)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-27 13:02:28.771: ERROR/AndroidRuntime(839):     at
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by kartik....@gmail.com on 27 Jul 2009 at 8:03