cgeo/c-geo-opensource — Issue #907: NullPointerException when returning to app
Author: Pitel
Created: 2011-12-23 08:46:15+00:00
State: open

I was returning to cgeo from another activity (using long-press home, and it crashed):

```
E/AndroidRuntime(19945): FATAL EXCEPTION: main
E/AndroidRuntime(19945): java.lang.RuntimeException: Unable to start activity ComponentInfo{cgeo.geocaching/cgeo.geocaching.cgeocaches}: java.lang.NullPointerException
E/AndroidRuntime(19945):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
E/AndroidRuntime(19945):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
E/AndroidRuntime(19945):	at android.app.ActivityThread.access$1500(ActivityThread.java:123)
E/AndroidRuntime(19945):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
E/AndroidRuntime(19945):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(19945):	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(19945):	at android.app.ActivityThread.main(ActivityThread.java:3835)
E/AndroidRuntime(19945):	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(19945):	at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(19945):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime(19945):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(19945):	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(19945): Caused by: java.lang.NullPointerException
E/AndroidRuntime(19945):	at cgeo.geocaching.cgData.getStatementStandardList(cgData.java:3110)
E/AndroidRuntime(19945):	at cgeo.geocaching.cgData.getList(cgData.java:3212)
E/AndroidRuntime(19945):	at cgeo.geocaching.cgeoapplication.getList(cgeoapplication.java:675)
E/AndroidRuntime(19945):	at cgeo.geocaching.cgeocaches.onCreate(cgeocaches.java:563)
E/AndroidRuntime(19945):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(19945):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
E/AndroidRuntime(19945):	... 11 more
```

It was after a long time, so I don't remember what activity was opened before. Using latest nightly on Android 2.3.7 (CM7). It has never happened to me before, and also I am not able to reproduce it.