Memory issue in realm
got this issue from my bug tracker:
io.realm.internal.OutOfMemoryErrorstd::bad_alloc in io_realm_internal_Row.cpp line 221
does this give you enough information?
Can you provide us with the Android log too? And maybe the Java source code where the exception is thrown.
One reason for this issue can be that your file system hasn't any space left. Can you check that?
i'll try to capture more data on the issue
This happened to me when not doing transactions properly/not writing in a transaction and then trying to read it.
@ImGauravC Do you mean something like:
realm.beginTransaction();
obj = realm.createObject(clazz);
realm.commitTransaction();
obj.setFoo("Bar");
yes, i think i could find the issue, one of my colleagues was doing that, there should be an exception thrown for this that explains it.
When I run the code above I get the expected exception: " java.lang.IllegalStateException: Mutable method call during read transaction."
well, i think the issue was that the code was something like:
RealmObject ro = new RealmObject();
some setters.
i found this and replaced with the right
realm.beginTransaction(); obj = realm.createObject(clazz); realm.commitTransaction();
and it disappeared.
Ah, I understand. We don't support standalone objects, and RealmObject cannot be used directly but only be used to extend into model classes (this will trigger the annotation processor).
We should probably make it more clear in the documentation and not only "hide" it in http://realm.io/docs/java/0.75.0/api/.