Repository: belav/csharpier

Issue #1206: [1.6.2] throws exception in Rider: wrong thread isProjectModelReady
Created: 2024-03-12T07:54:58Z
Environments

IDE Version: JetBrains Rider 2023.3.3  Build #RD-233.14015.60
Extension Version: 1.6.2 (just updated, yea)
CSharpier Version:  0.27.3
Operating System: linux, manjaro
.csharpierrc Settings:

{
	"printWidth": 140,
	"useTabs": true,
	"tabWidth": 4,
	"preprocessorSymbolSets": [
		"",
		"DEBUG",
		"DEBUG,CODE_STYLE"
	]
}


.editorconfig Settings:

root = true

[*]
end_of_line = lf
insert_final_newline = true

[backend/lib/Repository/Migrations/*]
generated_code = true

Stacktrace
Must be executed on UI thread or background threads with special permissions

java.lang.IllegalStateException: |E| Wrong thread RdOptionalProperty: `RiderBackend 0.SolutionModel.solutions.[1].riderSolutionLifecycle.isProjectModelReady`
	at com.jetbrains.rdclient.protocol.RdDispatcher.assertThread(RdDispatcher.kt:69)
	at com.jetbrains.rd.platform.protocol.SwitchingScheduler.assertThread(SwitchingScheduler.kt:22)
	at com.jetbrains.rd.framework.base.RdReactiveBase.assertThreading(RdReactiveBase.kt:28)
	at com.jetbrains.rd.framework.impl.RdPropertyBase.advise(RdProperty.kt:128)
	at com.jetbrains.rd.framework.impl.RdOptionalProperty.advise(RdProperty.kt:209)
	at com.jetbrains.rd.util.reactive.SourceExKt$adviseUntil$1.invoke(SourceEx.kt:34)
	at com.jetbrains.rd.util.reactive.SourceExKt$adviseUntil$1.invoke(SourceEx.kt:33)
	at com.jetbrains.rd.util.lifetime.Lifetime$createNested$1$1.invoke(RLifetime.kt:147)
	at com.jetbrains.rd.util.lifetime.Lifetime$createNested$1$1.invoke(RLifetime.kt:147)
	at com.jetbrains.rd.util.lifetime.LifetimeDefinition.executeIfAlive(RLifetime.kt:294)
	at com.jetbrains.rd.util.lifetime.Lifetime.createNested(RLifetime.kt:147)
	at com.jetbrains.rd.util.reactive.SourceExKt.adviseUntil(SourceEx.kt:33)
	at com.intellij.csharpier.CSharpierStartup.runActivity(CSharpierStartup.kt:19)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runOldActivity(StartupManagerImpl.kt:328)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runOldActivity(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$5$1.invoke(StartupManagerImpl.kt:271)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$5$1.invoke(StartupManagerImpl.kt:270)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
	at com.intellij.openapi.progress.CoroutinesKt.access$blockingContextInner(coroutines.kt:1)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:198)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:197)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:270)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:192)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:191)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Steps to reproduce

open project
a red exclamation mark appears in the corner

Duplicate issue #1207: [1.6.2] throws exception in Rider: wrong thread isProjectModelReady
Created: 2024-03-12T07:55:08Z
Environments

IDE Version: JetBrains Rider 2023.3.3  Build #RD-233.14015.60
Extension Version: 1.6.2 (just updated, yea)
CSharpier Version:  0.27.3
Operating System: linux, manjaro
.csharpierrc Settings:

{
	"printWidth": 140,
	"useTabs": true,
	"tabWidth": 4,
	"preprocessorSymbolSets": [
		"",
		"DEBUG",
		"DEBUG,CODE_STYLE"
	]
}


.editorconfig Settings:

root = true

[*]
end_of_line = lf
insert_final_newline = true

[backend/lib/Repository/Migrations/*]
generated_code = true

Stacktrace
Must be executed on UI thread or background threads with special permissions

java.lang.IllegalStateException: |E| Wrong thread RdOptionalProperty: `RiderBackend 0.SolutionModel.solutions.[1].riderSolutionLifecycle.isProjectModelReady`
	at com.jetbrains.rdclient.protocol.RdDispatcher.assertThread(RdDispatcher.kt:69)
	at com.jetbrains.rd.platform.protocol.SwitchingScheduler.assertThread(SwitchingScheduler.kt:22)
	at com.jetbrains.rd.framework.base.RdReactiveBase.assertThreading(RdReactiveBase.kt:28)
	at com.jetbrains.rd.framework.impl.RdPropertyBase.advise(RdProperty.kt:128)
	at com.jetbrains.rd.framework.impl.RdOptionalProperty.advise(RdProperty.kt:209)
	at com.jetbrains.rd.util.reactive.SourceExKt$adviseUntil$1.invoke(SourceEx.kt:34)
	at com.jetbrains.rd.util.reactive.SourceExKt$adviseUntil$1.invoke(SourceEx.kt:33)
	at com.jetbrains.rd.util.lifetime.Lifetime$createNested$1$1.invoke(RLifetime.kt:147)
	at com.jetbrains.rd.util.lifetime.Lifetime$createNested$1$1.invoke(RLifetime.kt:147)
	at com.jetbrains.rd.util.lifetime.LifetimeDefinition.executeIfAlive(RLifetime.kt:294)
	at com.jetbrains.rd.util.lifetime.Lifetime.createNested(RLifetime.kt:147)
	at com.jetbrains.rd.util.reactive.SourceExKt.adviseUntil(SourceEx.kt:33)
	at com.intellij.csharpier.CSharpierStartup.runActivity(CSharpierStartup.kt:19)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runOldActivity(StartupManagerImpl.kt:328)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runOldActivity(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$5$1.invoke(StartupManagerImpl.kt:271)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$5$1.invoke(StartupManagerImpl.kt:270)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
	at com.intellij.openapi.progress.CoroutinesKt.access$blockingContextInner(coroutines.kt:1)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:198)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:197)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:270)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:69)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:192)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:191)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Steps to reproduce
???

Closing comment (2024-03-12T14:13:48Z): duplicate of #1206