objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

java.lang.RuntimeException:Unable to stop activity {packagename/xxxxx}: io.objectbox.exception.PagesCorruptException: Could not get from cursor (page not found) (error code -30797)

Open linge123 opened this issue 3 years ago • 2 comments

io.objectbox.exception.PagesCorruptException Could not get from cursor (page not found)

crash message

java.lang.RuntimeException:Unable to stop activity {pakcage/xxxx.xxxx.activity.H5Activity}: io.objectbox.exception.PagesCorruptException: Could not get from cursor (page not found) (error code -30797) android.app.ActivityThread.callActivityOnStop(ActivityThread.java:5089) ...... io.objectbox.exception.PagesCorruptException:Could not get from cursor (page not found) io.objectbox.query.Query.nativeCount(Query.java) io.objectbox.query.Query.java.lang.Long lambda$count$6(long)(Query.java:388) io.objectbox.query.Query.java.lang.Long lambda$count$6$Query(long)(Query.java:0) io.objectbox.query.-$$Lambda$Query$-wwLmCqgkvNuNPIKD9OUGypiJwI.call(-.java:2) io.objectbox.Box.java.lang.Object internalCallWithReaderHandle(io.objectbox.internal.CallWithHandle)(Box.java:714) io.objectbox.query.Query.long count()(Query.java:388)

linge123 avatar Aug 04 '22 11:08 linge123

It appears the database file was corrupted. You can try to write code that tries to restore to the previous version:

https://github.com/objectbox/objectbox-examples/blob/b3d5e3e8bfb8c9b2f48dde14e2965a328b4a45bb/android-app/src/main/java/io/objectbox/example/ObjectBox.java#L23-L27

If that doesn't work, the solution is probably to delete the database file.

Do you have any details on when this happened? Also on what device are you using ObjectBox?

greenrobot-team avatar Aug 08 '22 06:08 greenrobot-team

you us OK let me try

linge123 avatar Aug 09 '22 06:08 linge123

Without additional information, we are unfortunately not sure how to resolve this issue. Therefore this issue has been automatically closed. Feel free to comment with additional details and we can re-open this issue.

github-actions[bot] avatar Sep 07 '22 01:09 github-actions[bot]