ChannelAtomicCancelStressTest fails with CoroutinesInternalError caused by ClassCastException
See original GitHub issuehttps://teamcity.jetbrains.com/viewLog.html?buildId=2565122&buildTypeId=KotlinTools_KotlinxCoroutines_BuildWindows
ChannelAtomicCancelStressTest.testAtomicCancelStress[RendezvousChannel]
kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(DispatchedContinuation[ThreadPoolDispatcher[2, ChannelAtomicCancelStressTest], Continuation at kotlinx.coroutines.channels.ChannelAtomicCancelStressTest$launchReceiver$1.invokeSuspend(ChannelAtomicCancelStressTest.kt:135)@7015c908]){CancelledContinuation[kotlinx.coroutines.JobCancellationException: Job was cancelled; job="coroutine#563998":StandaloneCoroutine{Cancelled}@7ed2297a]}@7aeda278. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:86)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to kotlinx.coroutines.DispatchedContinuation
at kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:106)
at kotlin.coroutines.jvm.internal.ContinuationImpl.releaseIntercepted(ContinuationImpl.kt:118)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:39)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:192)
... 7 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
JVM / IR: ClassCastException caused by runBlocking awaiting ...
Though Kotlin shows error when using Result as return type it was working good for us until we introduced coroutines.
Read more >Explanation of ClassCastException in Java - Stack Overflow
Cat c = (Dog) a; // Will cause a compiler error for type mismatch; ... A class cast exception is thrown by Java...
Read more >Handling the ClassCastException Runtime Exception in Java
The ClassCastException in Java happens when the JVM tries to cast an object to a class (or in some instances, an interface) and...
Read more >PM80589: JAVA.LANG.CLASSCASTEXCEPTION AFTER AN ...
Error description A ClassCastException occurs after an application restart because WebSphere Application Server continues to hold references to the application.
Read more >Explanation of ClassCastException in Java - Baeldung
We might expect a ClassCastException here, but in fact, we get a compilation error: “incompatible types: Frog cannot be converted to Mammal” ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The above crash log is reproducible in kotlinx.coroutines version 1.3.3 and 1.3.4
Recent versions of coroutines are not compatible with older versions of Kotlin.