Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

@mikedream89
Copy link

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)

@tonysumi
Copy link

I'm getting the same error when i try this :

  1. select customer
  2. In bottom-sheet, select the edit.
  3. Go back and then select the edit.
  4. Above said error appears
    @dpr-odoo

@joelc1225
Copy link

joelc1225 commented May 1, 2017

Did you guys figure this out? I'm having a similar issue

@donghd
Copy link

donghd commented May 3, 2017

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants