JasonWongYH / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

android.database.StaleDataException: Access closed cursor when pause, resume and stop recording #1183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Uses meet following crashes when pause and stop recording.

android.database.StaleDataException: Access closed cursor
    at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:217)
    at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:99)
    at android.database.CursorWrapper.getLong(CursorWrapper.java:132)
    at android.support.v4.widget.CursorAdapter.long getItemId(int)(Unknown Source)
    at android.widget.AdapterView.rememberSyncState(AdapterView.java:1129)
    at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:787)
    at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:31)
    at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50)
    at com.google.android.apps.mytracks.TrackListActivity$2.void onSharedPreferenceChanged(android.content.SharedPreferences,java.lang.String)(MT:169)
    at android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.notifyListeners(ContextImpl.java:3322)
    at android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.apply(ContextImpl.java:3232)
    at com.google.android.apps.mytracks.util.Api9Adapter.void applyPreferenceChanges(android.content.SharedPreferences$Editor)(MT:41)
    at com.google.android.apps.mytracks.util.PreferencesUtils.void setBoolean(android.content.Context,int,boolean)(MT:126)
    at com.google.android.apps.mytracks.util.TrackRecordingServiceConnectionUtils.void resetRecordingState(android.content.Context)(MT:165)
    at com.google.android.apps.mytracks.util.TrackRecordingServiceConnectionUtils.void stopRecording(android.content.Context,com.google.android.apps.mytracks.services.TrackRecordingServiceConnection,boolean)(MT:136)
    at com.google.android.apps.mytracks.TrackListActivity$5.void onClick(android.view.View)(MT:220)
    at android.view.View.performClick(View.java:2533)
    at android.view.View$PerformClick.run(View.java:9320)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:150)
    at android.app.ActivityThread.main(ActivityThread.java:4385)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
    at dalvik.system.NativeStart.main(Native Method)

Uses meet following crashes when resume the recording.
java.lang.RuntimeException: Unable to resume activity 
{com.google.android.maps.mytracks/com.google.android.apps.mytracks.TrackListActi
vity}: android.database.StaleDataException: Access closed cursor
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2247)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2262)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3822)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.StaleDataException: Access closed cursor
    at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:217)
    at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:99)
    at android.database.CursorWrapper.getLong(CursorWrapper.java:127)
    at android.support.v4.widget.CursorAdapter.long getItemId(int)(Unknown Source)
    at android.widget.AdapterView.rememberSyncState(AdapterView.java:1129)
    at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:787)
    at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:31)
    at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50)
    at com.google.android.apps.mytracks.TrackListActivity$2.void onSharedPreferenceChanged(android.content.SharedPreferences,java.lang.String)(MT:169)
    at android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.notifyListeners(ContextImpl.java:3046)
    at android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.apply(ContextImpl.java:2956)
    at com.google.android.apps.mytracks.util.Api9Adapter.void applyPreferenceChanges(android.content.SharedPreferences$Editor)(MT:41)
    at com.google.android.apps.mytracks.util.PreferencesUtils.void setBoolean(android.content.Context,int,boolean)(MT:126)
    at com.google.android.apps.mytracks.util.TrackRecordingServiceConnectionUtils.void resetRecordingState(android.content.Context)(MT:165)
    at com.google.android.apps.mytracks.util.TrackRecordingServiceConnectionUtils.void resumeConnection(android.content.Context,com.google.android.apps.mytracks.services.TrackRecordingServiceConnection)(MT:152)
    at com.google.android.apps.mytracks.TrackListActivity.void onResume()(MT:428)
    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
    at android.app.Activity.performResume(Activity.java:3832)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2237)

Original issue reported on code.google.com by youtaol@google.com on 1 Nov 2012 at 8:24

GoogleCodeExporter commented 9 years ago
Issue 1108 has been merged into this issue.

Original comment by youtaol@google.com on 1 Nov 2012 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 2 Nov 2012 at 7:54

GoogleCodeExporter commented 9 years ago
cac

Original comment by prayford...@gmail.com on 10 Dec 2013 at 12:09