Closed KimiChiu closed 1 year ago
If the database file is growing too large is usually a Realm version pinning issue, a Realm instance is not closed properly, or it is instantiated in a non-looper thread.
We would need more info about what this line does as it does not show any of Realm logic: RealmSyncHelper.getInstance().getChatRoomService().insertWithCheck
.
If the database file is growing too large is usually a Realm version pinning issue, a Realm instance is not closed properly, or it is instantiated in a non-looper thread.
Yes, I knew it. I just want to make sure my app has an ability to recover from this situation. And this one is not what I was expected.
We would need more info about what this line does as it does not show any of Realm logic:
RealmSyncHelper.getInstance().getChatRoomService().insertWithCheck
.
It's a simple insert method. And these i, 0, "id", "test", "test", 0, 0, data, data, "test", 0
are values.
We couldn't reproduce your issue. It would help us if you could provide a sample project that we could look at for debugging purposes.
Closing the issue due to lack of feedback. As mentioned this is most likely because the realm lifecycle is not handled correctly and the realm is not closed after use. If you need more input please supply the source code for the insertWithCheck
method, so that we have a chance to see what is going on.
How frequently does the bug occur?
All the time
Description
I am trying to reproduce the 'realm file size too large' issues from my Android emulator. So I use these codes to fill the database.
After the file size increased to 300 MB it starts to throw this exception. And I can't write any data into database anymore.
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
Use the code above repeatedly until it throws exception.
Version
above 7.0.8
What SDK flavour are you using?
Local Database only
Are you using encryption?
Yes, using encryption
Platform OS and version(s)
Android API 29 emulator
Build environment
Android Studio version: 4.1.3 Android Build Tools version: 29.0.2 Gradle version: 6.5