-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
1.6.0 Job initialization triggers a main thread disk read (Android JVM) #3180
Comments
Could you please elaborate whether you have R8 enabled? We previously had the same issue with We could workaround it with |
Yes, R8 is enabled. The same issue persists
|
If it is okay for you, could you please share small reproducing project so we can dissect it? |
Hi @qwwdfsad , Apologies for the weekend delay. https://github.com/radixdev/sscs-kotlin-coroutines-3180 is a reproducing project.
|
…auses verification of the whole JAR/dex (-> file I/O) and ANR Fixes #3180
Thanks! Verified my fix works |
Fixed in 1.6.1 |
Thank you @qwwdfsad ! |
Android Strictmode is stating that the initialization path of any created Job is triggering expensive disk reads (on the main thread). This behavior was introduced in 1.6.0 in this PR.
Simply calling
.launch { }
on the CoroutineScope is enough to trigger this disk read issue. I propose that the eager uncaught exception logic is configurable behind a system property or in some way configurable to avoid this issue. Additionally, this code is running as part of an SDK so we cannot completely control when it is executed as if we were the host application.@nreid260
Custom CoroutineScope
The disk reads
The text was updated successfully, but these errors were encountered: