Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Crash when sending message #18

Closed
kngako opened this issue May 11, 2022 · 1 comment
Closed

Bug: Crash when sending message #18

kngako opened this issue May 11, 2022 · 1 comment

Comments

@kngako
Copy link
Collaborator

kngako commented May 11, 2022

Paging API gets an index out of bounds.

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException
	at com.squareup.sqldelight.android.paging3.OffsetQueryPagingSource$load$2$1.invoke(OffsetQueryPagingSource.kt:40)
	at com.squareup.sqldelight.android.paging3.OffsetQueryPagingSource$load$2$1.invoke(OffsetQueryPagingSource.kt:38)
	at com.squareup.sqldelight.TransacterImpl.transactionWithWrapper(Transacter.kt:235)
	at com.squareup.sqldelight.TransacterImpl.transactionWithResult(Transacter.kt:221)
	at com.squareup.sqldelight.Transacter$DefaultImpls.transactionWithResult$default(Transacter.kt:61)
	at com.squareup.sqldelight.android.paging3.OffsetQueryPagingSource$load$2.invokeSuspend(OffsetQueryPagingSource.kt:38)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
@kngako
Copy link
Collaborator Author

kngako commented May 20, 2022

Bug and crash is related to the sqldelight paging implemenation. Fix is planned for version 2.0.0 of the library/extension. cashapp/sqldelight#2591

In the meantime we could remove the use of paging and use the previous implemenation of loading 1000 messages in a chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant