Here is the exception - it actually seems like it's the isEmpty part
of:

                if (bundle != null && !bundle.isEmpty()) {

although if that would throw a null pointer, then bundle!=null should
evaluate to false and the right side shouldn't be evaluated, no?

I did try removing the bundle.isEmpty and that led to a bad read
exception when it tried to read the parcelable.

Thanks!
Jamie

E/AndroidRuntime( 3798): FATAL EXCEPTION: main
E/AndroidRuntime( 3798): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.jwright.montana/com.jwright.montana.GameActivity}:
java.lang.Nul
lPointerException
E/AndroidRuntime( 3798):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 3798):        at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 3798):        at android.app.ActivityThread.access
$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 3798):        at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 3798):        at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 3798):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 3798):        at
android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 3798):        at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 3798):        at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 3798):        at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime( 3798):        at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:616)
E/AndroidRuntime( 3798):        at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 3798): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 3798):        at
com.jwright.montana.GameState.<init>(GameStat
e.java:43)
E/AndroidRuntime( 3798):        at
com.jwright.montana.GameState.<init>(GameStat
e.java:39)
E/AndroidRuntime( 3798):        at com.jwright.montana.GameState
$1.createFromPar
cel(GameState.java:31)
E/AndroidRuntime( 3798):        at com.jwright.montana.GameState
$1.createFromPar
cel(GameState.java:1)
E/AndroidRuntime( 3798):        at
android.os.Parcel.readParcelable(Parcel.java:
1906)
E/AndroidRuntime( 3798):        at
android.os.Parcel.readValue(Parcel.java:1771)

E/AndroidRuntime( 3798):        at
android.os.Parcel.readMapInternal(Parcel.java
:2008)
E/AndroidRuntime( 3798):        at
android.os.Bundle.unparcel(Bundle.java:208)
E/AndroidRuntime( 3798):        at
android.os.Bundle.isEmpty(Bundle.java:227)
E/AndroidRuntime( 3798):        at
com.jwright.montana.GameActivity.onCreate(Gam
eActivity.java:62)
E/AndroidRuntime( 3798):        at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1049)
E/AndroidRuntime( 3798):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 3798):        ... 11 more

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to