yuvipanda / WPSignpost

Wikipedia Signpost Android Application
8 stars 5 forks source link

Crash on Samsung Galaxy Tab 10.1 (Android 3.2) #30

Closed bvibber closed 11 years ago

bvibber commented 12 years ago

App opens, starts to load, then crashes out.

Log shows null pointer exception backtrace:

I/ActivityManager( 304): Displayed in.yuvi.wpsignpost/.PostsActivity: +394ms D/AndroidRuntime( 9669): Shutting down VM W/dalvikvm( 9669): threadid=1: thread exiting with uncaught exception (group=0x40126760) E/AndroidRuntime( 9669): FATAL EXCEPTION: main E/AndroidRuntime( 9669): java.lang.NullPointerException E/AndroidRuntime( 9669): at in.yuvi.wpsignpost.PostsActivity.showIssue(PostsActivity.java:116) E/AndroidRuntime( 9669): at in.yuvi.wpsignpost.PostsActivity.access$2(PostsActivity.java:102) E/AndroidRuntime( 9669): at in.yuvi.wpsignpost.PostsActivity$FetchIssuesTask.onPostExecute(PostsActivity.java:77) E/AndroidRuntime( 9669): at in.yuvi.wpsignpost.PostsActivity$FetchIssuesTask.onPostExecute(PostsActivity.java:1) E/AndroidRuntime( 9669): at android.os.AsyncTask.finish(AsyncTask.java:590) E/AndroidRuntime( 9669): at android.os.AsyncTask.access$600(AsyncTask.java:149) E/AndroidRuntime( 9669): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:603) E/AndroidRuntime( 9669): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 9669): at android.os.Looper.loop(Looper.java:132) E/AndroidRuntime( 9669): at android.app.ActivityThread.main(ActivityThread.java:4126) E/AndroidRuntime( 9669): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 9669): at java.lang.reflect.Method.invoke(Method.java:491) E/AndroidRuntime( 9669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844) E/AndroidRuntime( 9669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) E/AndroidRuntime( 9669): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 304): Force finishing activity in.yuvi.wpsignpost/.PostsActivity

yuvipanda commented 12 years ago

issue seems to be null (or this is an actionbarsherlock messup) - need to figure out which of those things is null. Issue shouldn't be null, since there's a check for that before calling showIssue (at L76), so this is weird.

Isn't type safety so so wonderfully useful in catching all manner of such errors? :P

bvibber commented 12 years ago

Type safety would help more if most types didn't consist of "either an object or null, which will break when you try to use it". :PPPPP

yuvipanda commented 12 years ago

Possibly fixed in the same commit that fixed #46. Can you test and confirm?

bvibber commented 12 years ago

Galaxy Tab's at home, I won't be able to test until I get back from vacation next week. There should be one floating about the office, or Trevor can test on his.

bvibber commented 12 years ago

New crash:

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to create application in.yuvi.wpsignpost.SignpostApp: java.lang.IllegalStateException: Application does not define permission in.yuvi.wpsignpost.permission.C2D_MESSAGE
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3702)
    at android.app.ActivityThread.access$1200(ActivityThread.java:122)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1065)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:132)
    at android.app.ActivityThread.main(ActivityThread.java:4126)
    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:844)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Application does not define permission in.yuvi.wpsignpost.permission.C2D_MESSAGE
    at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:137)
    at in.yuvi.wpsignpost.SignpostApp.onCreate(SignpostApp.java:24)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:968)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3699)
    ... 10 more
bvibber commented 11 years ago

Doesn't explode on same machine running Android 4. Yay? Yay!