You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.
#62
Open
mikedream89 opened this issue
Mar 18, 2016
· 3 comments
Cursor was closed, how to fix the error ????
thanks
Process: com.odoo.crm, PID: 11925
android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.
at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:139)
at android.database.AbstractWindowedCursor.getType(AbstractWindowedCursor.java:130)
at android.database.CursorWrapper.getType(CursorWrapper.java:146)
at com.odoo.core.utils.OCursorUtils.cursorValue(OCursorUtils.java:42)
at com.odoo.core.utils.OCursorUtils.toDatarow(OCursorUtils.java:33)
at com.odoo.addons.crm.CRMLeads.onItemClick(CRMLeads.java:332)
at com.odoo.widgets.bottomsheet.BottomSheet$2$1.run(BottomSheet.java:184)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
The text was updated successfully, but these errors were encountered:
In my case, as I recognized loading data is updating (especially during refreshing or updating) that make previous stored (Cursor) data is deactivated, so I fixed as below:
Store position (along with (Cursor) data)
Before using Cursor , get back data from position:
for ex:
data = mAdapter.getItem(sheet.getPosition());
sheet.setData(data);
Cursor was closed, how to fix the error ????
thanks
Process: com.odoo.crm, PID: 11925
android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.
at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:139)
at android.database.AbstractWindowedCursor.getType(AbstractWindowedCursor.java:130)
at android.database.CursorWrapper.getType(CursorWrapper.java:146)
at com.odoo.core.utils.OCursorUtils.cursorValue(OCursorUtils.java:42)
at com.odoo.core.utils.OCursorUtils.toDatarow(OCursorUtils.java:33)
at com.odoo.addons.crm.CRMLeads.onItemClick(CRMLeads.java:332)
at com.odoo.widgets.bottomsheet.BottomSheet$2$1.run(BottomSheet.java:184)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
The text was updated successfully, but these errors were encountered: