MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
942 stars 132 forks source link

* Idea Plugin: fix for IllegalStateException reported in review #771

Closed dkimitsa closed 4 months ago

dkimitsa commented 4 months ago

Note: from the log it seems like the test is being running in WSL on Windows machine. So it should not affect Mac users

After performing an additional automated check, we have found that this plugin version causes the freeze on the IDE startup:

java.lang.IllegalStateException: This method is forbidden on EDT because it does not pump the event queue. Switch to a BGT, or use com.intellij.openapi.progress.TasksKt.runWithModalProgressBlocking.
 at com.intellij.openapi.progress.CoroutinesKt.assertBackgroundThreadOrWriteAction(coroutines.kt:448)
 at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:125)
 at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:121)
 at com.intellij.execution.wsl.WslIjentUtil.fetchLoginShellEnv(WslIjentUtil.kt:34)
 at com.intellij.execution.wsl.WSLDistribution.getEnvironmentVariable(WSLDistribution.java:794)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinderWsl$WslSystemInfoProvider.getEnvironmentVariable(JavaHomeFinderWsl.java:59)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinderBasic.findInPATH(JavaHomeFinderBasic.java:122)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinderBasic.findExistingJdks(JavaHomeFinderBasic.java:102)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinderWindows._init_$lambda$0(JavaHomeFinderWindows.kt:71)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinderBasic.findExistingJdks(JavaHomeFinderBasic.java:102)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinder.suggestHomePaths(JavaHomeFinder.java:73)
 at com.intellij.openapi.projectRoots.impl.JavaHomeFinder.suggestHomePaths(JavaHomeFinder.java:61)
 at com.intellij.openapi.projectRoots.impl.JavaSdkImpl.suggestHomePaths(JavaSdkImpl.java:196)
 at org.robovm.idea.components.setupwizard.JdkSetupDialog.<init>(JdkSetupDialog.java:43)
 at org.robovm.idea.components.RoboVmApplicationComponent.displaySetupWizard(RoboVmApplicationComponent.java:65)
 at org.robovm.idea.components.RoboVmApplicationComponent.initComponent(RoboVmApplicationComponent.java:47)
Today