You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting reports of ExceptionInInitializerError from Android 5 devices.
GlobalScope is used here, because the coroutines should not depend on Android's activity or fragment lifecycle. On other places I'm extending CoroutineScope and don't see crashes there.
When calling await() inside GlobalScope.launch{ }:
Fatal Exception: java.lang.ExceptionInInitializerError
Caused by java.lang.RuntimeException: java.lang.NoSuchFieldException: _decision
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl.(AtomicIntegerFieldUpdater.java:270)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdater.java:49)
at kotlinx.coroutines.CancellableContinuationImpl.(CancellableContinuationImpl.kt)
at kotlinx.coroutines.CompletableDeferredImpl.await(CompletableDeferred.kt:70)
at com.example.MyClass$aNiceFunction$1.invokeSuspend(MyClass.kt:391)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$getSchedulerName$p(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
And directly when calling GlobalScope.launch(Dispatchers.IO) { }:
Fatal Exception: java.lang.ExceptionInInitializerError
Caused by java.lang.RuntimeException: java.lang.NoSuchFieldException: lastScheduledTask
at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.(AtomicReferenceFieldUpdater.java:202)
at java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdater.java:67)
at kotlinx.coroutines.scheduling.WorkQueue.(WorkQueue.kt)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.(CoroutineScheduler.kt:622)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.(CoroutineScheduler.kt:616)
at kotlinx.coroutines.scheduling.CoroutineScheduler.createNewWorker(CoroutineScheduler.kt:473)
at kotlinx.coroutines.scheduling.CoroutineScheduler.requestCpuWorker(CoroutineScheduler.kt:401)
at kotlinx.coroutines.scheduling.CoroutineScheduler.dispatch(CoroutineScheduler.kt:353)
at kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher.dispatchWithContext$kotlinx_coroutines_core(Dispatcher.kt:106)
at kotlinx.coroutines.scheduling.LimitingDispatcher.dispatch(Dispatcher.kt:158)
at kotlinx.coroutines.scheduling.LimitingDispatcher.dispatch(Dispatcher.kt:148)
at kotlinx.coroutines.DispatchedKt.resumeCancellable(Dispatched.kt:376)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:25)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:109)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:160)
at kotlinx.coroutines.BuildersKt.kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Unknown Source:5)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default$28f1ba1(Builders.common.kt:47)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
at com.example.MyClass2.onPushOpened(MyClass2.kt:42)
at com.google.android.gms.gcm.GcmListenerService.handleIntent(Unknown Source)
at com.google.android.gms.iid.zzf.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered:
kotlin:1.3.21, kotlinx-coroutines-core:1.1.1
I'm getting reports of
ExceptionInInitializerError
from Android 5 devices.GlobalScope is used here, because the coroutines should not depend on Android's activity or fragment lifecycle. On other places I'm extending CoroutineScope and don't see crashes there.
When calling
await()
insideGlobalScope.launch{ }
:And directly when calling
GlobalScope.launch(Dispatchers.IO) { }
:The text was updated successfully, but these errors were encountered: