9

When viewing a question and it's deleted, pulling down to refresh will crash the app.

Here is the logcat log:

E/AndroidRuntime(13354): FATAL EXCEPTION: main
E/AndroidRuntime(13354): java.lang.RuntimeException: [v0.1.58] java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
E/AndroidRuntime(13354):    at com.stackexchange.marvin.core.question.QuestionTask.getByQuestionId(QuestionTask.java:54)
E/AndroidRuntime(13354):    at com.stackexchange.marvin.core.question.QuestionTask.getByQuestionId(QuestionTask.java:38)
E/AndroidRuntime(13354):    at com.stackexchange.marvin.ui.question.QuestionFragment.refresh(QuestionFragment.java:142)
E/AndroidRuntime(13354):    at com.stackexchange.marvin.ui.question.QuestionFragment.onRefresh(QuestionFragment.java:300)
E/AndroidRuntime(13354):    at com.handmark.pulltorefresh.library.PullToRefreshBase.callRefreshListener(PullToRefreshBase.java:1063)
E/AndroidRuntime(13354):    at com.handmark.pulltorefresh.library.PullToRefreshBase.access$000(PullToRefreshBase.java:43)
E/AndroidRuntime(13354):    at com.handmark.pulltorefresh.library.PullToRefreshBase$1.onSmoothScrollFinished(PullToRefreshBase.java:742)
E/AndroidRuntime(13354):    at com.handmark.pulltorefresh.library.PullToRefreshBase$SmoothScrollRunnable.run(PullToRefreshBase.java:1638)
E/AndroidRuntime(13354):    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
E/AndroidRuntime(13354):    at android.view.Choreographer.doCallbacks(Choreographer.java:555)
E/AndroidRuntime(13354):    at android.view.Choreographer.doFrame(Choreographer.java:524)
E/AndroidRuntime(13354):    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
E/AndroidRuntime(13354):    at android.os.Handler.handleCallback(Handler.java:615)
E/AndroidRuntime(13354):    at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(13354):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(13354):    at android.app.ActivityThread.main(ActivityThread.java:4803)
E/AndroidRuntime(13354):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(13354):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(13354):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/AndroidRuntime(13354):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
E/AndroidRuntime(13354):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(13354): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
E/AndroidRuntime(13354):    at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
E/AndroidRuntime(13354):    at java.util.Arrays$ArrayList.get(Arrays.java:66)
E/AndroidRuntime(13354):    at com.stackexchange.marvin.core.question.QuestionTask.getByQuestionId(QuestionTask.java:51)
E/AndroidRuntime(13354):    ... 20 more

Steps to reproduce:
Monitor MSO for programming questions, when one appears view it with the Android app and wait for it to be deleted. Then pull to refresh.

1

1 Answer 1

3

Fixed in version 0.1.60 coming out later tonight. The app will now show you an error message rather than crashing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .