You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using your library for my project and I started to get this exception, so let me guide you through my project, inside of worker I'm checking some data:
override suspend fun doWork(): Result {
//code
val reversals = Database.transactionRepository().findAllReversals()
//code
}
and here is my findAllReversals:
suspend fun findAllReversals(): List {
return dispatch {
RealmFunction { realm ->
realm.copyFromRealm(
realm.where().equalTo("_status", StatusType.UNKNOWN.name).findAll()
).toList()
}
}
}
So at some point of accessing data sometimes (rarely) my app just crashes with error:
java.lang.RuntimeException: Exception while computing database live data.
at androidx.room.RoomTrackingLiveData.refreshRunnable$lambda$0(RoomTrackingLiveData.kt:74)
at androidx.room.RoomTrackingLiveData.$r8$lambda$PhMGW5zFk4QWazERd2lfEeLZqW0(RoomTrackingLiveData.kt)
at androidx.room.RoomTrackingLiveData$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0(TransactionExecutor.kt:36)
at androidx.room.TransactionExecutor.$r8$lambda$AympDHYBb78s7_N_9gRsXF0sHiw(TransactionExecutor.kt)
at androidx.room.TransactionExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:96)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=1 (# cursors opened by this proc=1)
at android.database.CursorWindow.(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:138)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:219)
at android.database.AbstractCursor.moveToNext(AbstractCursor.java:268)
at androidx.work.impl.model.WorkSpecDao_Impl.__fetchRelationshipWorkTagAsjavaLangString(WorkSpecDao_Impl.java:2528)
at androidx.work.impl.model.WorkSpecDao_Impl.access$100(WorkSpecDao_Impl.java:36)
at androidx.work.impl.model.WorkSpecDao_Impl$15.call(WorkSpecDao_Impl.java:1103)
at androidx.work.impl.model.WorkSpecDao_Impl$15.call(WorkSpecDao_Impl.java:1074)
at androidx.room.RoomTrackingLiveData.refreshRunnable$lambda$0(RoomTrackingLiveData.kt:72)
... 9 more
Is there any walkarounds or fixes for that?
The text was updated successfully, but these errors were encountered:
Hi, I'm using your library for my project and I started to get this exception, so let me guide you through my project, inside of worker I'm checking some data:
override suspend fun doWork(): Result {
//code
val reversals = Database.transactionRepository().findAllReversals()
//code
}
and here is my findAllReversals:
suspend fun findAllReversals(): List {
return dispatch {
RealmFunction { realm ->
realm.copyFromRealm(
realm.where().equalTo("_status", StatusType.UNKNOWN.name).findAll()
).toList()
}
}
}
So at some point of accessing data sometimes (rarely) my app just crashes with error:
java.lang.RuntimeException: Exception while computing database live data.
at androidx.room.RoomTrackingLiveData.refreshRunnable$lambda$0(RoomTrackingLiveData.kt:74)
at androidx.room.RoomTrackingLiveData.$r8$lambda$PhMGW5zFk4QWazERd2lfEeLZqW0(RoomTrackingLiveData.kt)
at androidx.room.RoomTrackingLiveData$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0(TransactionExecutor.kt:36)
at androidx.room.TransactionExecutor.$r8$lambda$AympDHYBb78s7_N_9gRsXF0sHiw(TransactionExecutor.kt)
at androidx.room.TransactionExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:96)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=1 (# cursors opened by this proc=1)
at android.database.CursorWindow.(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:138)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:219)
at android.database.AbstractCursor.moveToNext(AbstractCursor.java:268)
at androidx.work.impl.model.WorkSpecDao_Impl.__fetchRelationshipWorkTagAsjavaLangString(WorkSpecDao_Impl.java:2528)
at androidx.work.impl.model.WorkSpecDao_Impl.access$100(WorkSpecDao_Impl.java:36)
at androidx.work.impl.model.WorkSpecDao_Impl$15.call(WorkSpecDao_Impl.java:1103)
at androidx.work.impl.model.WorkSpecDao_Impl$15.call(WorkSpecDao_Impl.java:1074)
at androidx.room.RoomTrackingLiveData.refreshRunnable$lambda$0(RoomTrackingLiveData.kt:72)
... 9 more
Is there any walkarounds or fixes for that?
The text was updated successfully, but these errors were encountered: