image-chooser-library
image-chooser-library copied to clipboard
Cursor error on image select or capture image
Hey,
I'm using this lib and working charm for me but from my last project integration, I'm getting the below error on capturing image as well as selecting image from the gallery.
Cause By Indicating cursor error: Caused by: android.database.StaleDataException: Attempted to access a cursor after it has been closed.
Here is a full logcat report
java.lang.RuntimeException: Unable to resume activity {com.works.works2016/com.works.works2016.CreateRequestActivity}: android.database.StaleDataException: Attempted to access a cursor after it has been closed. at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2575) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2603) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: android.database.StaleDataException: Attempted to access a cursor after it has been closed. at android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:64) at android.database.BulkCursorToCursorAdaptor.requery(BulkCursorToCursorAdaptor.java:133) at android.database.CursorWrapper.requery(CursorWrapper.java:186) at android.app.Activity.performRestart(Activity.java:5048) at android.app.Activity.performResume(Activity.java:5074) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2565) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2603) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method)
Looks like a problem with your code. Could you give some code snippets of your implementation?