murraycu / android-galaxyzoo

This Android app lets you classify Galaxy Zoo subjects. It is available in the Google Play Store: https://play.google.com/store/apps/details?id=com.murrayc.galaxyzoo.app . Try beta versions early here: https://play.google.com/apps/testing/com.murrayc.galaxyzoo.app . See also the iPhone app for Galaxy Zoo: https://github.com/murraycu/ios-galaxyzoo/
GNU General Public License v3.0
11 stars 13 forks source link

Crash in getShowDiscussQuestionFromSharedPrefs() from abandonItem(). #16

Closed murraycu closed 9 years ago

murraycu commented 9 years ago

Here's a backtrace from a crash reported with version 1.36 on Android 4.4. There is only one report of this crash so far:

java.lang.NullPointerException
at com.murrayc.galaxyzoo.app.Utils.getShowDiscussQuestionFromSharedPrefs(Unknown Source)
                                   abandonItem
at com.murrayc.galaxyzoo.app.ItemFragment.abandonItem(Unknown Source)
at com.murrayc.galaxyzoo.app.SubjectFragment$2.onError(Unknown Source)
at com.squareup.picasso.ImageViewAction.complete(Unknown Source)
                                        error
at com.squareup.picasso.Picasso.cancelRequest(Unknown Source)
                                load
                                load
                                getRequestHandlers
                                transformRequest
                                defer
                                enqueueAndSubmit
                                complete
                                deliverAction
                                cancelExistingRequest
                                with
                                access$000
at com.squareup.picasso.Picasso.cancelRequest(Unknown Source)
                                load
                                load
                                getRequestHandlers
                                transformRequest
                                defer
                                enqueueAndSubmit
                                complete
                                deliverAction
                                cancelExistingRequest
                                with
                                access$000
at com.squareup.picasso.Picasso$1.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
murraycu commented 9 years ago

The (retraced with proguardgui) backtrace doesn't really make sense because Utils.getShowDiscussQuestionFromSharedPrefs() should never be called (even indirectly) by Utils.abandonItem(). But this might stop if if it is really happening there: https://github.com/murraycu/android-galaxyzoo/commit/25e0e54db2cdc81996312db5f11e57a363a0cf18

Maybe it's just a one-off problem with a single problematic device.