HaxeFoundation / intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
http://intellij-haxe.org
Apache License 2.0
219 stars 100 forks source link

Write access is allowed inside write-action only #1164

Closed barisyild closed 7 months ago

barisyild commented 7 months ago
Unhandled exception in [ComponentManager(ProjectImpl@1798575600), CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelling}@5fcdc35a, Dispatchers.Default]

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Write access is allowed inside write-action only (see Application.runWriteAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[DefaultDispatcher-worker-64,5,main] 971090742 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 986975868
    at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:180)
    at com.intellij.util.concurrency.ThreadingAssertions.throwThreadAccessException(ThreadingAssertions.java:174)
    at com.intellij.util.concurrency.ThreadingAssertions.assertWriteAccess(ThreadingAssertions.java:169)
    at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.commitChanges(ProjectJdkImpl.java:204)
    at com.intellij.plugins.haxe.config.sdk.HaxeSdkType.setupSdkPaths(HaxeSdkType.java:98)
    at com.intellij.plugins.haxe.haxelib.HaxelibSdkUtils.tryToSetDefaultSdk(HaxelibSdkUtils.java:55)
    at com.intellij.plugins.haxe.haxelib.HaxelibSdkUtils.getDefaultSDK(HaxelibSdkUtils.java:121)
    at com.intellij.plugins.haxe.haxelib.HaxelibSdkUtils.lookupSdk(HaxelibSdkUtils.java:96)
    at com.intellij.plugins.haxe.haxelib.HaxelibProjectUpdater$ProjectTracker.<init>(HaxelibProjectUpdater.java:1234)
    at com.intellij.plugins.haxe.haxelib.HaxelibProjectUpdater$ProjectMap.add(HaxelibProjectUpdater.java:1423)
    at com.intellij.plugins.haxe.haxelib.HaxelibProjectUpdater.openProject(HaxelibProjectUpdater.java:124)
    at com.intellij.plugins.haxe.haxelib.HaxelibProjectStartActivity.execute(HaxelibProjectStartActivity.java:19)
    at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:473)
    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)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [ComponentManager(ProjectImpl@1798575600), CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelled}@5fcdc35a, Dispatchers.Default]

Plugin Version: 1.4.46

IntelliJ IDEA 2024.1 (Ultimate Edition)
Build #IU-241.14494.240, built on March 28, 2024
Runtime version: 17.0.10+8-b1207.12 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Non-Bundled Plugins:
  com.intellij.plugins.haxe (1.4.46)
Kotlin: 241.14494.240-IJ

Side Effects of Exception

Animation Selecting Project SDK not working.

barisyild commented 7 months ago

Apparently the problem does not exist in 2023.3.

m0rkeulv commented 7 months ago

This should be fixed in 1.5.1