We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have the crash in runtime in an obfuscated version of my android application.
The application contains simple code like:
launch { ... withContext(UI) { ... } }
Stacktrace after retrace:
java.lang.ClassCastException: kotlinx.coroutines.experimental.ay cannot be cast to kotlinx.coroutines.experimental.android.b at kotlinx.coroutines.experimental.android.HandlerContextKt.getUI(Unknown Source) at com.example.myapp.MainActivity$refreshCurrentAuthenticators$1.invoke(Unknown Source) doResume create create at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.getContext(Unknown Source) resume resumeWithException doResume create at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.getSuccessfulResult(Unknown Source) run at kotlinx.coroutines.experimental.DispatchedContinuation.run(Unknown Source) at kotlinx.coroutines.experimental.scheduling.Task.run(Unknown Source) at kotlinx.coroutines.experimental.scheduling.CoroutineScheduler.parkedWorkersStackTopUpdate(Unknown Source) parkedWorkersStackPush shutdown dispatch dispatch$default createTask$kotlinx_coroutines_core submitToLocalQueue runSafely access$getSchedulerName$p access$runSafely access$getMAX_PARK_TIME_NS$cp access$parkedWorkersStackPush access$parkedWorkersStackTopUpdate at kotlinx.coroutines.experimental.scheduling.CoroutineScheduler.parkedWorkersStackTopUpdate(Unknown Source) parkedWorkersStackPush shutdown dispatch dispatch$default createTask$kotlinx_coroutines_core submitToLocalQueue runSafely access$getSchedulerName$p access$runSafely access$getMAX_PARK_TIME_NS$cp access$parkedWorkersStackPush access$parkedWorkersStackTopUpdate at kotlinx.coroutines.experimental.scheduling.CoroutineScheduler$Worker.run(Unknown Source)
The application works well with 0.30.0 version kotlin version 1.2.71 gradle 4.10.1 android gradle plugin 3.2.0 proguard-rules contains:
-keepclassmembernames class kotlinx.** { volatile <fields>; }
The text was updated successfully, but these errors were encountered:
I create a sample of crash in a release build: https://github.com/HotIceCream/CoroutinesSimpleExample/blob/master/app/src/main/java/com/github/hoticecream/coroutinessimpleexample/MainActivity.kt#L17
Sorry, something went wrong.
Thank you for the reproducer. It appears to be the same bug as in #657. Will be fixed in 1.0.0-RC, workaround is to add
-keepnames class kotlinx.coroutines.experimental.internal.MainDispatcherFactory {}
to your proguard rules.
No branches or pull requests
I have the crash in runtime in an obfuscated version of my android application.
The application contains simple code like:
Stacktrace after retrace:
The application works well with 0.30.0 version
kotlin version 1.2.71
gradle 4.10.1
android gradle plugin 3.2.0
proguard-rules contains:
The text was updated successfully, but these errors were encountered: