Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 7 - Fatal Exception: kotlinx.coroutines.CoroutinesInternalError #2161

Closed
mhernand40 opened this issue Jul 22, 2020 · 3 comments
Closed

Comments

@mhernand40
Copy link

mhernand40 commented Jul 22, 2020

I'm seeing the following fatal exception specifically on Android 7 for a select few devices:

Screen Shot 2020-07-22 at 4 35 37 PM

Fatal Exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[DefaultDispatcher, Continuation at kotlinx.coroutines.flow.internal.CombineKt$combineInternal$2.invokeSuspend(Combine.kt)@2d63402]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
       at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.java:93)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:64)
       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)
Caused by java.lang.IllegalStateException: Job ScopeCoroutine{Cancelling}@1362676 is already complete or completing, but is being completed with CompletedExceptionally[kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@90a8477]
       at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.java:828)
       at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.java:111)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:46)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:55)
       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)
Caused by kotlinx.coroutines.JobCancellationException: Job was cancelled
@mhernand40
Copy link
Author

Similarly, I am also seeing the following fatal exception on Android 7 only for the following devices:

Screen Shot 2020-07-22 at 4 38 42 PM

Fatal Exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[DefaultDispatcher, Continuation at kotlinx.coroutines.flow.internal.CombineKt$asFairChannel$1.invokeSuspend(Combine.kt)@6c78f7c]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
       at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.java:93)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:64)
       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)
Caused by java.lang.IllegalStateException: This continuation is already complete
       at kotlin.coroutines.jvm.internal.CompletedContinuation.resumeWith(CompletedContinuation.java:129)
       at kotlinx.coroutines.selects.SelectBuilderImpl.resumeSelectWithException(SelectBuilderImpl.java:314)
       at kotlinx.coroutines.channels.AbstractChannel$ReceiveSelect.resumeReceiveClosed(AbstractChannel.java:941)
       at kotlinx.coroutines.channels.AbstractSendChannel.helpClose(AbstractSendChannel.java:312)
       at kotlinx.coroutines.channels.AbstractSendChannel.close(AbstractSendChannel.java:241)
       at kotlinx.coroutines.channels.ProducerCoroutine.onCancelled(ProducerCoroutine.java:141)
       at kotlinx.coroutines.AbstractCoroutine.onCompletionInternal(AbstractCoroutine.java:102)
       at kotlinx.coroutines.JobSupport.finalizeFinishingState(JobSupport.java:235)
       at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.java:903)
       at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.java:860)
       at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.java:825)
       at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.java:111)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:46)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:55)
       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)

@mhernand40
Copy link
Author

I think this may actually be a dup of #1743.

@qwwdfsad
Copy link
Member

qwwdfsad commented Aug 3, 2020

Yes, it is a duplicate, please refer to #1743 (comment)

@qwwdfsad qwwdfsad closed this as completed Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants