Closed
Description
I'm using Kotlin coroutine 1.3.2, and my app is obfuscated. When I using coroutines, I get the following crash stack:
java.lang.RuntimeException: java.lang.NoSuchFieldException: No field result in class Lkotlin/f/i;
java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.<init>(AtomicReferenceFieldUpdater.java:338)
at java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdater.java:109)
at kotlin.coroutines.SafeContinuation.<clinit>(SourceFile:31)
According to the mapping file, the class Lkotlin/f/i
is actually SafeContinuation
. I look into SafeContinuation
, there is a field named result
, and it is volatile
.
I also noticed that the Kotlin extension library's proguard file has kept all volatile field. So I guess it is also necessary to keep all volatile in Kotlin's stdlib?
Metadata
Metadata
Assignees
Labels
No labels