question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for AwaitContinuation

See original GitHub issue

Short description

I reinstalled FlorisBoard a few times to test something and in one of the iterations I got this crash when I tapped on the button of the second step. The thing is I can’t reproduce it, it seemed very random. I hope the crash log is more informative than my description.

Steps to reproduce

  1. Go to setup screen
  2. Click on second step
  3. See crash

Environment information

  • FlorisBoard Version: 0.3.14-beta03 (59)
  • Device: Xiaomi Redmi Note 8
  • Android: 11 (cn=R sdk=30)

Features enabled

smartbar = true
suggestions = false
suggestions_clipboard = true
suggestions_next_word = true
glide = false
clipboard_internal = false
clipboard_history = false

Attached stacktrace files

1632826153862.stacktrace
kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for AwaitContinuation(DispatchedContinuation[Dispatchers.IO, Continuation at dev.patrickgold.florisboard.ime.text.layout.LayoutManager$loadLayoutAsync$1.invokeSuspend(LayoutManager.kt:85)@3e97ab6]){Completed}@59ce724. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
	at kotlinx.coroutines.DispatchedTask.handleFatalException(DispatchedTask.kt:144)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.ClassCastException: kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to kotlinx.coroutines.internal.DispatchedContinuation
	at kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:108)
	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:104)
	... 4 more

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickgoldcommented, Sep 28, 2021

No I think you are the only one who filled in the bug report form for this crash, so I will close all other issues with the exact same crash and reference to this one. Makes it at least more easy to reference in the future.

0reactions
patrickgoldcommented, Sep 29, 2021

As for dependabot:

I agree that I might should put in an automatic dependency version updater, but I do not really like the fact that dependabot uses PR’s for this. Will see if I can find local alternatives for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fatal exception in coroutines machinery for ... - GitHub
If I move delay() into another method then I get this exception. Strange thing is that I am unable to reproduce this in...
Read more >
kotlinx.coroutines.CoroutinesInternalError: Fatal exception in ...
CoroutinesInternalError : Fatal exception in coroutines machinery for DispatchedContinuation when using delay().
Read more >
kotlin.coroutines.intrinsics.CoroutineSingletons cannot be cast ...
This addressed here. The only way I could get it working is by removing inline and crossinline from my suspended function.
Read more >
Coroutine exceptions handling | Kotlin
We already know that a cancelled coroutine throws CancellationException in suspension points and that it is ignored by the coroutines' machinery ...
Read more >
Measuring execution time in Kotlin coroutines | Blog | bol.com
Background kotlinx. coroutines is one of the asynchronous (and ... CoroutinesInternalError: Fatal exception in coroutines machinery for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found