objectbox / objectbox/objectbox-java

io.objectbox.exception.FileCorruptException: Corrupt DB, min key size violated: 0

Open
#1,143 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

hello in my app always

Basic info (please complete the following information):
ObjectBox version : :3.5.1
Reproducibility: occurred once only
Devices: android

init boxStore code:
BoxStoreBuilder storeBuilder = MyObjectBox.builder()
.validateOnOpen(ValidateOnOpenMode.WithLeaves) // Additional DB page validation
.validateOnOpenPageLimit(20)
.androidContext(context.getApplicationContext())

queryData code:
getBox().query().equal(Db_.userId, "4229047", QueryBuilder.StringOrder.CASE_INSENSITIVE).build().find();

Logs, stack traces:
io.objectbox.exception.FileCorruptException: Corrupt DB, min key size violated: 0
at io.objectbox.query.Query.nativeFind(Native Method)
at io.objectbox.query.Query.lambda$find$2$io-objectbox-query-Query(Query.java:252)
at io.objectbox.query.Query$$ExternalSyntheticLambda4.call(Unknown Source:2)
at io.objectbox.BoxStore.callInReadTx(BoxStore.java:940)
at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:886)
at io.objectbox.query.Query.callInReadTx(Query.java:368)
at io.objectbox.query.Query.find(Query.java:251)

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the BoxStoreBuilder configuration and the query call shown in the issue, then trace the FileCorruptException stack from Query.find. Try to reproduce the one-time Android failure and compare the result with the validation settings; done means identifying a reproducible cause or a confirmed next step for handling the corrupt database.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
databases, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.