matburt/mobileorg-android — Issue #162: Crash upon drilling down outline hierarchy
Author: jfmcbrayer
Created: 2012-02-09 13:29:47+00:00
State: open

I just re-installed mobileorg because it looks like the new features will make a real usability difference. I did a fresh sync after clearing all app data, and it reported success. Now, when clicking on any node, it shows that node's children, but then immediately force closes. Here's the relevant snippet from logcat:

```
I/ActivityManager( 1356): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.matburt.mobileorg.donate/.Gui.OutlineActivity bnds=[163,610][237,723] }
I/ActivityManager( 1356): Start proc com.matburt.mobileorg.donate for activity com.matburt.mobileorg.donate/.Gui.OutlineActivity: pid=24609 uid=10065 gids={3003, 1015}
I/ActivityManager( 1356): Displayed activity com.matburt.mobileorg.donate/.Gui.OutlineActivity: 528 ms (total 528 ms)
I//system/bin/batteryd( 1253): 67312805	v_bat 3.763 (3.759), i_supply 0.000, i_demand 0.279 => v_bat_idle 3.791 (3.784), level 60% (62%, 61%), state 4
I/ActivityManager( 1356): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.zeam/.Launcher }
D/Launcher(17599): -- loadPreferences()
W/InputManagerService( 1356): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@45918290 (uid=10065 pid=24609)
D/dalvikvm(24609): GC_FOR_MALLOC freed 2949 objects / 292472 bytes in 132ms
D/AndroidRuntime(24609): Shutting down VM
W/dalvikvm(24609): threadid=1: thread exiting with uncaught exception (group=0x4001d8a8)
E/AndroidRuntime(24609): FATAL EXCEPTION: main
E/AndroidRuntime(24609): java.lang.RuntimeException: Unable to stop activity {com.matburt.mobileorg.donate/com.matburt.mobileorg.donate.Gui.OutlineActivity}: android.database.StaleDataException: Access closed cursor
E/AndroidRuntime(24609):	at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3413)
E/AndroidRuntime(24609):	at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3458)
E/AndroidRuntime(24609):	at android.app.ActivityThread.access$2600(ActivityThread.java:125)
E/AndroidRuntime(24609):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2050)
E/AndroidRuntime(24609):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(24609):	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(24609):	at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(24609):	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(24609):	at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(24609):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(24609):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(24609):	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(24609): Caused by: android.database.StaleDataException: Access closed cursor
E/AndroidRuntime(24609):	at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:217)
E/AndroidRuntime(24609):	at android.database.AbstractWindowedCursor.getInt(AbstractWindowedCursor.java:84)
E/AndroidRuntime(24609):	at android.database.MergeCursor.getInt(MergeCursor.java:136)
E/AndroidRuntime(24609):	at com.matburt.mobileorg.donate.Gui.OutlineCursorAdapter.getItemId(OutlineCursorAdapter.java:40)
E/AndroidRuntime(24609):	at android.widget.AbsListView.onSaveInstanceState(AbsListView.java:885)
E/AndroidRuntime(24609):	at android.widget.ListView.onSaveInstanceState(ListView.java:3628)
E/AndroidRuntime(24609):	at android.widget.AdapterView.access$100(AdapterView.java:42)
E/AndroidRuntime(24609):	at android.widget.AdapterView$AdapterDataSetObserver.onInvalidated(AdapterView.java:800)
E/AndroidRuntime(24609):	at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:43)
E/AndroidRuntime(24609):	at android.widget.BaseAdapter.notifyDataSetInvalidated(BaseAdapter.java:54)
E/AndroidRuntime(24609):	at android.widget.CursorAdapter$MyDataSetObserver.onInvalidated(CursorAdapter.java:391)
E/AndroidRuntime(24609):	at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:43)
E/AndroidRuntime(24609):	at android.database.AbstractCursor.deactivateInternal(AbstractCursor.java:89)
E/AndroidRuntime(24609):	at android.database.AbstractCursor.deactivate(AbstractCursor.java:78)
E/AndroidRuntime(24609):	at android.database.sqlite.SQLiteCursor.deactivate(SQLiteCursor.java:493)
E/AndroidRuntime(24609):	at android.database.MergeCursor.deactivate(MergeCursor.java:185)
E/AndroidRuntime(24609):	at android.app.Activity.performStop(Activity.java:3869)
E/AndroidRuntime(24609):	at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3410)
E/AndroidRuntime(24609):	... 11 more
I/Process (24609): Sending signal. PID: 24609 SIG: 9
I/ActivityManager( 1356): Process com.matburt.mobileorg.donate (pid 24609) has died.
W/ActivityManager( 1356): Scheduling restart of crashed service com.matburt.mobileorg.donate/.Services.SyncService in 5000ms
I/WindowManager( 1356): WIN DEATH: Window{459d5da0 com.matburt.mobileorg.donate/com.matburt.mobileorg.donate.Gui.OutlineActivity paused=false}
W/InputManagerService( 1356): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@458e5080
W/ActivityManager( 1356): Activity destroy timeout for HistoryRecord{45c37f90 com.matburt.mobileorg.donate/.Gui.OutlineActivity}
```