Eugene
09/12/2023, 10:22 AMkotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled
It has no stacktrace (due to https://github.com/Kotlin/kotlinx.coroutines/issues/1866).
The only case that I was able to reproduce is when you throw this exception outside of coroutines.
Any ideas?Sam
09/12/2023, 10:39 AMEugene
09/12/2023, 10:44 AMSam
09/12/2023, 10:46 AMawait
on a cancelled deferred
• Calling cancel()
on the current job, especially inside a coroutineScope or withContext blockSam
09/12/2023, 10:47 AMEugene
09/12/2023, 10:48 AMespecially inside a coroutineScope or withContext blockI couldn’t reproduce it manually inside any scope/coroutine. Any cancellation exception was swallowed silently as expected.
Sam
09/12/2023, 10:49 AMsuspend fun main() = coroutineScope {
cancel()
}
https://pl.kotl.in/69W7CAite
I’m not familiar with Android so I’m not sure how I would repro it thereZach Klippenstein (he/him) [MOD]
09/12/2023, 3:38 PMEugene
09/12/2023, 3:43 PM