-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
We have been struggling with more or less random errors for some time now. Lately I've experienced this one during developement:
04-18 12:51:32.263 E/REALM_JNI: jni: ThrowingException 5, flock() failed: Bad file descriptor in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 126, .
Exception has been thrown: Unrecoverable error. flock() failed: Bad file descriptor in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 126
04-18 12:51:32.270 E/AndroidRuntime: FATAL EXCEPTION: SyncAdapterThread-3
Process: com.example.app, PID: 12352
io.realm.exceptions.RealmError: Unrecoverable error. flock() failed: Bad file descriptor in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 126
at io.realm.internal.OsSharedRealm.nativeBeginTransaction(Native Method)
at io.realm.internal.OsSharedRealm.beginTransaction(OsSharedRealm.java:269)
at io.realm.BaseRealm.beginTransaction(BaseRealm.java:401)
at io.realm.Realm.beginTransaction(Realm.java:146)
at io.realm.Realm.executeTransaction(Realm.java:1403)
at com.example.app.sync.SyncAdapter.syncCars(SyncAdapter.kt:1266)
at com.example.app.sync.SyncAdapter.syncComplete(SyncAdapter.kt:140)
at com.example.app.sync.SyncAdapter.onPerformSync(SyncAdapter.kt:101)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:321)
> Note: The sync adapter framework runs onPerformSync() on a background thread, so you don't have to set up your own background processing.
The code of the SyncAdapter wasn't changed for quite a while. At the specific line, there is just an {{realm.executeTransaction
{ ... }}}.
Can you guys read anything from the stack trace? What's causing this crash?
Version of Realm and tooling
Realm version(s): 5.0.0
Realm sync feature enabled: no
Android Studio version: 3.1.1
Which Android version and device: Pixel 2 (Android 8.1.0)