siramix / buzzwords

A mobile word game that will change the word.
www.siramix.com/buzzwords
GNU General Public License v3.0
10 stars 1 forks source link

Crash on interrupt by phone call or opening of several apps #105

Closed lucasrowe closed 11 years ago

lucasrowe commented 11 years ago

To reproduce

  1. Start a game
  2. Receive a call mid-game
  3. Try to resume the app via the app switcher

OR

  1. Start a game
  2. Open another app, repeat several times until Buzzwords is at the bottom of the stack.
  3. Reopen buzzwords

D/AndroidRuntime(29228): Shutting down VM W/dalvikvm(29228): threadid=1: thread exiting with uncaught exception (group=0x40c99300) E/AndroidRuntime(29228): FATAL EXCEPTION: main E/AndroidRuntime(29228): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.buzzwords/com.buzzwords.TurnActivity}: java.lang.NullPointerException E/AndroidRuntime(29228): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) E/AndroidRuntime(29228): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) E/AndroidRuntime(29228): at android.app.ActivityThread.access$600(ActivityThread.java:130) E/AndroidRuntime(29228): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/AndroidRuntime(29228): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(29228): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(29228): at android.app.ActivityThread.main(ActivityThread.java:4745) E/AndroidRuntime(29228): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(29228): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(29228): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/AndroidRuntime(29228): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime(29228): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(29228): Caused by: java.lang.NullPointerException E/AndroidRuntime(29228): at com.buzzwords.TurnActivity.setupUIProperties(TurnActivity.java:840) E/AndroidRuntime(29228): at com.buzzwords.TurnActivity.onCreate(TurnActivity.java:946) E/AndroidRuntime(29228): at android.app.Activity.performCreate(Activity.java:5008) E/AndroidRuntime(29228): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) E/AndroidRuntime(29228): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) E/AndroidRuntime(29228): ... 11 more W/ActivityManager( 290): Force finishing activity com.buzzwords/.TurnActivity W/ActivityManager( 290): Activity pause timeout for ActivityRecord{421c92a0 com.buzzwords/.TurnActivity}

lucasrowe commented 11 years ago

This is not a crash due to phone calls per se. It's due to the app getting taken out of memory as other apps come in. One solution might be to set ourself up as a high priority app that is always running that can be controlled through the notification list. This is a lot of work because we'd need to allow people to kill the app there and handle other cases I'm not aware of. It also might tie us to a certain api level.

lucasrowe commented 11 years ago

Closing. We're handling this as a new release.