-
Notifications
You must be signed in to change notification settings - Fork 305
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
io.objectbox.exception.DbFullException: Could not put #1199
Comments
First, "com.ObjectBox" is not our package and it's weird, ours is io.objectbox. So, is that "your" package? For the Exception, https://objectbox.io/docfiles/java/current/io/objectbox/exception/DbFullException.html explains it with a solution.
Opening the store does internal transactions, which is perfectly normal. All in all, not a bug. |
Yes, "com.ObjectBox" is our package not yours. As I mentioned above, the crash happens during application launch inside the method: while trying to execute the following code (this is the first line of code in the above method): So, you mean that the Exception can be avoided by creating the boxStore as follows: Am I correct ? |
Yes, you reached the default limit of 1 GB. This value a precaution in case your database keeps growing indefinitely. |
Thanks for reporting! I clarified the class documentation to avoid the confusion about transactions and the default max size. Until released, here is a copy:
Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments. |
@greenrobot-team Just a minor clarification. You said:
The crash in our application appeared during the execution of the following code: which as far as I understand, attempts to open the store without changing the max size property of the existing database. I forgot to mention, that in our app we use an algorithm that after store opening increases the max size when the remaining free space is less than 100 MB. |
When It is possible that in your case the database was opened with a max size larger than the default before, then it is now tried to open with the smaller default max size and fails. I also prepared a test to verify this will throw the
At last, as I don't know the internals I'm not sure if there are any transactions when just opening the Store (which the Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments. |
Build info
Stacktrace from Crashlytics:
As you can see, the crash happens during application launch inside the method:
computeProperMaxSizeInKByte(Context context)
while trying to execute the following code (this is the first line of code in the above method):
BoxStore boxStore = MyObjectBox.builder().androidContext(context.getApplicationContext()).build();
I was aware of the issue: #633 that causes the crash during a transaction,
but in my case there is no transaction, just an attempt to build the BoxStore instance.
The text was updated successfully, but these errors were encountered: