Jakob K
03/23/2021, 7:19 PMasCompletableFuture()
on a Deferred<T>
instance:
Exception in thread "DefaultDispatcher-worker-2" [20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(DispatchedContinuation[<http://Dispatchers.IO|Dispatchers.IO>, Continuation at net.axay.fabrik.commands.BrigardierWrapperKt$simpleSuggests$1$1.invokeSuspend(BrigardierWrapper.kt:78)@6fab03fa]){Cancelled}@7a8f83b6. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.DispatchedTask.handleFatalException(DispatchedTask.kt:144)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: Caused by: java.lang.ClassCastException: class kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to class kotlinx.coroutines.internal.DispatchedContinuation (kotlin.coroutines.jvm.internal.CompletedContinuation and kotlinx.coroutines.internal.DispatchedContinuation are in unnamed module of loader 'app')
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:104)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlin.coroutines.jvm.internal.ContinuationImpl.releaseIntercepted(ContinuationImpl.kt:118)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:39)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
[20:05:24] [DefaultDispatcher-worker-2/INFO] (Minecraft) [STDERR]: ... 4 more
The image shows the code where the error appears. Could this have something to do with inline
, crossinline
or the lambda (or the combination of them all)? Is this an internal bug?
The cast that fails can be seen in the second image I attached.
Does anyone have an idea why this error even appears?