Closed as not planned
Description
Describe the bug
We sporadically receive complaints from users, upon checking logs, queries on specific boxes seem to be throwing a "FileCorruptException: Corrupt DB, min key size violated: 0". While all other queries work fine, I just need to understand under what circumstance this exception gets thrown and how best to go about dealing with the issue as I couldn't find any documentation about this specific exception and couldn't find a replication scenario.
Basic info (please complete the following information):
- ObjectBox version (are you using the latest version?): 3.2.0
- Reproducibility: occasionally without visible pattern
- Device: No specific device, observed on multiple different devices through app logs
- OS: same as above
Code
No specific area where this happens, but one of the examples is as follows:
private fun fillFromDb(store: BoxStore, toFind: Collection<String>) {
store.boxFor(StoredSong::class.java)
.query()
.inValues(StoredSong_.id, toFind.toTypedArray(), QueryBuilder.StringOrder.CASE_INSENSITIVE)
.build()
.find()
Logs, stack traces
at io.objectbox.BoxStore.v(BoxStore.java:17)
at io.objectbox.BoxStore.A(BoxStore.java:1)
at io.objectbox.query.Query.B(Query.java:2)
at io.objectbox.query.Query.k0(Query.java:1)
at com.anghami.ghost.local.StoredSongLookupKt.fillFromDb(StoredSongLookup.kt:8)
at com.anghami.ghost.local.StoredSongLookupKt.lookupSongs$lambda-4(StoredSongLookup.kt:1)
at com.anghami.ghost.local.StoredSongLookupKt.a(Unknown Source:0)
at com.anghami.ghost.local.g.call(Unknown Source:2)
at com.anghami.ghost.objectbox.BoxAccess$3$1.call(BoxAccess.java:1)
at io.objectbox.BoxStore.v(BoxStore.java:16)
... 24 more
Caused by: io.objectbox.exception.FileCorruptException: Corrupt DB, min key size violated: 0
at io.objectbox.query.Query.nativeFind(Native Method)
at io.objectbox.query.Query.F0(Query.java:1)
at io.objectbox.query.Query.n(Unknown Source:0)
at io.objectbox.query.g.call(Unknown Source:2)
at io.objectbox.BoxStore.v(BoxStore.java:16)