Skip to content

Instantly share code, notes, and snippets.

@raphaelr
Created October 12, 2022 16:15
Show Gist options
  • Save raphaelr/81cb36e561d01825f88ad93601415edf to your computer and use it in GitHub Desktop.
Save raphaelr/81cb36e561d01825f88ad93601415edf to your computer and use it in GitHub Desktop.
Must be executed on UI thread or background threads with special permissions
java.lang.IllegalStateException: |E| Wrong thread null
at com.jetbrains.rdclient.protocol.RdDispatcher.assertThread(RdDispatcher.kt:60)
at com.jetbrains.rd.util.reactive.IScheduler$DefaultImpls.assertThread$default(Scheduler.kt:16)
at com.jetbrains.rd.framework.base.RdReactiveBase.assertThreading(RdReactiveBase.kt:27)
at com.jetbrains.rd.framework.base.RdReactiveBase.localChange$rd_framework(RdReactiveBase.kt:46)
at com.jetbrains.rd.framework.impl.RdOptionalProperty.set(RdProperty.kt:128)
at com.jetbrains.rdclient.services.uiContext.UiContextManager.setInitialValuesForModel(UiContextManager.kt:52)
at com.jetbrains.rdclient.services.uiContext.UiContextManager.<init>(UiContextManager.kt:42)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:54)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1003)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:36)
at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:145)
at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda-1(BaseComponentAdapter.kt:124)
at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:123)
at com.intellij.serviceContainer.BaseComponentAdapter.access$createInstance(BaseComponentAdapter.kt:19)
at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invokeSuspend(BaseComponentAdapter.kt:172)
at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceAsync(BaseComponentAdapter.kt:167)
at com.intellij.serviceContainer.ComponentManagerImpl.createComponentsNonBlocking(ComponentManagerImpl.kt:435)
at com.intellij.serviceContainer.ComponentManagerImpl$createComponentsNonBlocking$1.invokeSuspend(ComponentManagerImpl.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment