Closed volkerrichert closed 5 years ago
Yep, the Realm DB can get really big and actually just full of fragmented empty space.
Compacting has been added for v0.7.0 and this reduces the file sizes by a a massive amount.
Any ETA for 0.7.0 release ?
Things are slow dev-wise with the summer so probably autumn sometime.
If this issue is affecting you then clear the app data, you will need to re-enter your settings.
Is there a workround to fix this problem? My tablet was running for a long time without issues. The app is now unstable...
Workaround is in the previous post.
Closed - completed and available in 0.7.0 release
If the uploader runs a log time, the database will became to lange to be loaded.
In the log i found
--------- beginning of crash 06-08 00:06:45.086 884 884 E AndroidRuntime: FATAL EXCEPTION: main 06-08 00:06:45.086 884 884 E AndroidRuntime: Process: info.nightscout.android, PID: 884 06-08 00:06:45.086 884 884 E AndroidRuntime: Theme: themes:{} 06-08 00:06:45.086 884 884 E AndroidRuntime: io.realm.exceptions.RealmError: Unrecoverable error. mmap() failed: Out of memory size: 738197504 offset: 0 in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 238 06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.internal.SharedRealm.nativeGetSharedRealm(Native Method) 06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.internal.SharedRealm.(SharedRealm.java:185)
06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:237)
06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:201)
06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:298)
06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:284)
06-08 00:06:45.086 884 884 E AndroidRuntime: at io.realm.Realm.getInstance(Realm.java:299)
06-08 00:06:45.086 884 884 E AndroidRuntime: at info.nightscout.urchin.Urchin.openRealm(Urchin.java:118)
06-08 00:06:45.086 884 884 E AndroidRuntime: at info.nightscout.urchin.Urchin.update(Urchin.java:171)
06-08 00:06:45.086 884 884 E AndroidRuntime: at info.nightscout.urchin.Urchin.(Urchin.java:112)
06-08 00:06:45.086 884 884 E AndroidRuntime: at info.nightscout.android.medtronic.service.MasterService.onCreate(MasterService.java:142)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:2911)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.app.ActivityThread.-wrap4(ActivityThread.java)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1446)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
06-08 00:06:45.086 884 884 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5461)
06-08 00:06:45.086 884 884 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-08 00:06:45.086 884 884 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-08 00:06:45.086 884 884 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-08 00:06:45.129 636 651 W KeyguardServiceDelegate: onScreenTurningOn(): no keyguard service!
Pogman told me he is working on shrinking DB. So, this is just for documenting the exeption
Your Environment