0
回答
UI->ExpandableListView->Cursor FC
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   


01-03 11:09:41.141: W/dalvikvm(15635): threadid=1: thread exiting with uncaught exception (group=0x40c7a930)
01-03 11:09:41.141: E/AndroidRuntime(15635): FATAL EXCEPTION: main
01-03 11:09:41.141: E/AndroidRuntime(15635): android.database.StaleDataException: Attempted to access a cursor after it has been closed.
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:64)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.BulkCursorToCursorAdaptor.getColumnNames(BulkCursorToCursorAdaptor.java:159)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.AbstractCursor.getColumnIndex(AbstractCursor.java:284)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.CursorWrapper.getColumnIndex(CursorWrapper.java:73)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.CursorTreeAdapter$MyCursorHelper.<init>(CursorTreeAdapter.java:412)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.CursorTreeAdapter.getChildrenCursorHelper(CursorTreeAdapter.java:106)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.CursorTreeAdapter.getChildrenCount(CursorTreeAdapter.java:177)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.ExpandableListConnector.refreshExpGroupMetadataList(ExpandableListConnector.java:563)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.ExpandableListConnector.access$000(ExpandableListConnector.java:50)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.ExpandableListConnector$MyDataSetObserver.onInvalidated(ExpandableListConnector.java:864)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:50)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.BaseExpandableListAdapter.notifyDataSetInvalidated(BaseExpandableListAdapter.java:49)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.CursorTreeAdapter.notifyDataSetInvalidated(CursorTreeAdapter.java:320)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.widget.CursorTreeAdapter$MyCursorHelper$MyDataSetObserver.onInvalidated(CursorTreeAdapter.java:518)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:50)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.AbstractCursor.onDeactivateOrClose(AbstractCursor.java:129)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.AbstractWindowedCursor.onDeactivateOrClose(AbstractWindowedCursor.java:207)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.AbstractCursor.close(AbstractCursor.java:148)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:118)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.database.CursorWrapper.close(CursorWrapper.java:49)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1860)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.CursorLoader.onReset(CursorLoader.java:189)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.Loader.reset(Loader.java:437)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.app.LoaderManagerImpl$LoaderInfo.destroy(LoaderManager.java:380)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:464)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.Loader.deliverResult(Loader.java:143)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.CursorLoader.deliverResult(CursorLoader.java:113)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.CursorLoader.deliverResult(CursorLoader.java:43)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:254)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:91)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.os.AsyncTask.finish(AsyncTask.java:631)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.os.AsyncTask.access$600(AsyncTask.java:177)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.os.Handler.dispatchMessage(Handler.java:99)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.os.Looper.loop(Looper.java:137)
01-03 11:09:41.141: E/AndroidRuntime(15635): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-03 11:09:41.141: E/AndroidRuntime(15635): at java.lang.reflect.Method.invokeNative(Native Method)
01-03 11:09:41.141: E/AndroidRuntime(15635): at java.lang.reflect.Method.invoke(Method.java:511)
01-03 11:09:41.141: E/AndroidRuntime(15635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-03 11:09:41.141: E/AndroidRuntime(15635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-03 11:09:41.141: E/AndroidRuntime(15635): at dalvik.system.NativeStart.main(Native Method)
01-03 11:09:42.712: I/Process(15635): Sending signal. PID: 15635 SIG: 9


ExpandableListView中加载了一批Cursor,用户打开UI,按HOME键切到后台,然后同步联系人,导致CURSOR数据发生变化,这时再切回来,正赶上CURSOR在重载。

怎么整啊?

举报
iptvphone
发帖于4年前 0回/260阅
顶部