Closed matomick closed 7 years ago
How easy is it to reproduce? Does it happens every time?
Does it happens the first time, the app is opened?
The database was allready created since a while, for my case I was using my app for 3 month. It seems to be very rare. But the app crash without any exceptions, so I don't have any reports if it.
I think it could be an issue with the MIUI or EMUI android app killer (energy saver). If there is a transaction, and the app is killed during the commit, maybe it could corrupt the database? Like with a non encrypted database, just the data of this transaction is corrupted, but with an encrypted database, all the database is corrupted...
@matomick Thanks for providing a hypothesis. Without reproduction, I can only comment in general terms. Realm should not corrupt a database if the app is kill during a transaction.
Hi @matomick Without further information there is not much we can do about this. I'll close it for now, but feel free to reopen if more information about reproducing this surfaces.
I had the same issue, but I don't got more Informationen than @matomick posted. I used my app and write 5-10minutes and than the app crashed. After this I can´t start the app again. It Looks like that the database is corrupted. @kneth
@tkrawetzke is the version 2.x+?
2.1.1 and after updating to 2.2.0 the issue isn't resolved too.
For me the init isn't the Problem. Realm.init(context) (works) RealmConfiguration.Builder().schemaVersion(10).migration(DatabaseMigration(context)).build() (works) Realm.setDefaultConfiguration(configuration) (works) Realm.getDefaultInstance() (crashed)
It looks like if I read or write on realm the app crashed.
Currently we have solved the problem by downgrade the realm version to v2.0.2
More Information that we got: We use a sync adapter and if we got much data the realm crashed while we update data after syncing it. But in v2.0.2 we can´t repro it at the moment.
I get this crash with some devices (Honor7, Xiaomi MI5, etc...), it seems like the realm database is corrupted, but it never happens with precedent realm versions. (current version: 2.1.1)
The crash appears on Realm.getInstance(conf) Any ideas?
my realmConfig: realmFileName = Realm.DEFAULT_REALM_NAME; config = new RealmConfiguration.Builder() .name(realmFileName) .schemaVersion(versionSchema) .encryptionKey(keykey) .migration(new MigrationRealm()) .build();
logs: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x28 in tid 6777 (cetts.messaging) Build fingerprint: 'Xiaomi/gemini/gemini:6.0/MRA58K/V7.2.8.0.MAACNDB:user/release-keys' pid: 6777, tid: 6777, name: cetts.messaging >>> com.facetts.messaging <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 sp 0000007fd4d0ae40 pc 0000007fab9653cc pstate 0000000060000000 backtrace:
00 pc 00000000001523cc /data/app/com.facetts.messaging-2/lib/arm64/librealm-jni.so