Skip to content

coroutine crash: java.lang.NoSuchFieldException:_decision #1900

@boyan01

Description

@boyan01

I'm using Kotlin coroutine 1.3.4, and my app is obfuscated. some user's device got a crash:

java.lang.NoSuchFieldException:_decision
at java.lang.Class.getDeclaredField(Class.java:929)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl.<init>(AtomicIntegerFieldUpdater.java:251)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdater.java:49)
at v.a.s0.<clinit>(Builders.common.kt)
at a.o.a.i.c$b.a(ConnectionProfile.java:641)
at MyAppPackageName$c.b(AppName.kt:26)
at f0.v.k.a.a.a(ContinuationImpl.kt:2)
at v.a.t0.run(DispatchedTask.kt:22)
at v.a.q2.b.a(CoroutineScheduler.kt:39)
at v.a.q2.b$a.run(CoroutineScheduler.kt:12)

According to the mapping file. the real call stack is

 java.lang.NoSuchFieldException:_decision
at java.lang.Class.getDeclaredField(Class.java:929)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl.<init>(AtomicIntegerFieldUpdater.java:251)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdater.java:49)
at kotlinx.coroutines.DispatchedCoroutine.<clinit>(DispatchedCoroutine.java)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(BuildersKt__Builders_commonKt.java:158)
at kotlinx.coroutines.BuildersKt.withContext(BuildersKt.java:1)
at MyAppPackageName$initialize$1.invokeSuspend(AppName.java:97)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)

it is necessary to keep _decision field of DispatchedCoroutine?
build

  • classpath 'com.android.tools.build:gradle:3.5.3'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions