realm-java: io.realm.exceptions.RealmFileException: Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. Incompatible lock file. Shared info version doesn't match, 7 10.
Goal
I was simply trying to update Realm from 0.90.1 to 3.3.1.
Expected Results
Normal app behaviour.
Actual Results
We get reports (Crashlytics) of
io.realm.exceptions.RealmFileException: Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. Incompatible lock file. Shared info version doesn't match, 7 10
happening only on Android 4.4.*.
Steps & Code to Reproduce
Not able to reproduce.
Code Sample
The way we use Realm:
- we init
RealmwithRealm.init(this);inApplication.onCreate()callback - we provide
Realm.getDefaultInstance()viaDagger2(AppComponent/AppModule) inMainActivity
@Provides
@ApplicationScope
public Realm provideRealm(RealmConfiguration configuration) {
Realm.setDefaultConfiguration(configuration);
return Realm.getDefaultInstance();
}
- we do
Realm.getDefaultInstance().close()inApplication.ActivityLifecycleCallbacks.onActivityDestroyed(), but only when theActivitys count is0 - not sure if that is relevant (
Widgets are my current lead here), but we do provide widgets and inject dependencies toWidgetService(these dependencies do depend onRealm, soRealm.getDefaultInstance()is called when widgets gets refreshed
Version of Realm and tooling
Realm version(s): 0.90.1 to 3.3.1
Realm sync feature enabled: no
Android Studio version: Android Studio 3.0 Canary 4
Which Android version and device: 4.4.* ONLY
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 31 (15 by maintainers)
@beeender I’ve sent the mail with additional info (files) to help@realm.io (the title is the issue id
4905)BTW, you can verify your idea by manually making a broken realm file, eg, just generate a random file and name it as the same with realm file.