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

Update app during turn in progress may cause crashes #115

Closed lucasrowe closed 11 years ago

lucasrowe commented 11 years ago

It seems the game gets in a confused state when relaunching buzzwords if a turn is in progress. It's like it tries to resume a game that is not resumable. Perhaps the relaunch process cleans our stored state and prevents it from being resumed? The concern here is maybe the store does the same thing instead of a full uninstall (though I doubt that).

To reproduce:

  1. Load buzzwords and background it while a turn is in progress
  2. Make changes to the code in Eclipse
  3. Relaunch buzzwords (the launcher will install the new code)

Newly relaunched Buzzwords will then crash when hitting Turn.

E/AndroidRuntime( 4914): FATAL EXCEPTION: main E/AndroidRuntime( 4914): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.buzzwords/com.buzzwords.TurnActivity}: java.lang.NullPointerException E/AndroidRuntime( 4914): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) E/AndroidRuntime( 4914): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) E/AndroidRuntime( 4914): at android.app.ActivityThread.access$600(ActivityThread.java:130) E/AndroidRuntime( 4914): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/AndroidRuntime( 4914): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 4914): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 4914): at android.app.ActivityThread.main(ActivityThread.java:4745) E/AndroidRuntime( 4914): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4914): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 4914): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/AndroidRuntime( 4914): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime( 4914): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 4914): Caused by: java.lang.NullPointerException E/AndroidRuntime( 4914): at com.buzzwords.TurnActivity.showCurrentCard(TurnActivity.java:746) E/AndroidRuntime( 4914): at com.buzzwords.TurnActivity.onCreate(TurnActivity.java:1074) E/AndroidRuntime( 4914): at android.app.Activity.performCreate(Activity.java:5008) E/AndroidRuntime( 4914): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) E/AndroidRuntime( 4914): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) E/AndroidRuntime( 4914): ... 11 more

lucasrowe commented 11 years ago

Commit 196aa9d7a0f5e6dccd73e3c0e3a9c5230206a531 fixed this.