rkhmelyuk/multirun

Error when multirun configuration is running: Assert: must be called on EDT

charger opened this issue · 8 comments

First time after RubyMine starts and I run a configuration I got:

java.lang.Throwable: Assert: must be called on EDT
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
	at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.setIcon(ToolWindowImpl.kt:448)
	at com.intellij.execution.ui.RunContentManagerImpl.updateToolWindowDecoration(RunContentManagerImpl.kt:455)
	at com.intellij.execution.ui.RunContentManagerImpl.getOrCreateContentManagerForToolWindow(RunContentManagerImpl.kt:422)
	at com.intellij.execution.ui.RunContentManagerImpl.getContentManagerForRunner(RunContentManagerImpl.kt:416)
	at com.intellij.execution.ui.RunContentManagerImpl.getReuseContent(RunContentManagerImpl.kt:391)
	at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile(ExecutionManagerImpl.kt:216)
	at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.kt:178)
	at com.intellij.execution.runners.AsyncProgramRunner.execute(GenericProgramRunner.kt:47)
	at com.khmelyuk.multirun.MultirunRunnerState.runConfigurations(MultirunRunnerState.java:273)
	at com.khmelyuk.multirun.MultirunRunnerState.lambda$runConfigurations$1(MultirunRunnerState.java:281)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

and everything seems working. But maybe you cat fix this error?

Kethet commented

A similiar exception about EDT is thrown in Rider 2023.2

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed from Event Dispatch Thread (EDT) only; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[ApplicationImpl pooled thread 70,4,main] 210890599 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1525721885
	at com.intellij.openapi.application.impl.ApplicationImpl.createThreadAccessException(ApplicationImpl.java:1083)
	at com.intellij.openapi.application.impl.ApplicationImpl.throwThreadAccessException(ApplicationImpl.java:1078)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1066)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow(ToolWindowManagerImpl.kt:1018)
	at com.jetbrains.rdserver.toolWindow.BackendServerToolWindowManager.registerToolWindow(BackendServerToolWindowManager.kt:114)
	at com.intellij.execution.ui.RunContentManagerImpl.registerToolWindow(RunContentManagerImpl.kt:155)
	at com.intellij.execution.ui.RunContentManagerImpl.getOrCreateContentManagerForToolWindow(RunContentManagerImpl.kt:432)
	at com.intellij.execution.ui.RunContentManagerImpl.getContentManagerForRunner(RunContentManagerImpl.kt:416)
	at com.intellij.execution.ui.RunContentManagerImpl.getReuseContent(RunContentManagerImpl.kt:391)
	at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile(ExecutionManagerImpl.kt:216)
	at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.kt:178)
	at com.jetbrains.rider.run.RiderAsyncProgramRunner.execute(RiderAsyncProgramRunner.kt:37)
	at com.khmelyuk.multirun.MultirunRunnerState.runConfigurations(MultirunRunnerState.java:273)
	at com.khmelyuk.multirun.MultirunRunnerState.lambda$execute$0(MultirunRunnerState.java:76)
	at com.intellij.codeWithMe.ClientId$Companion.decorateRunnable$lambda$4(ClientId.kt:304)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

Same in IntelliJ 2023.2

Current thread: Thread[ApplicationImpl pooled thread 17,4,main] 40901902 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 562820872
	at com.intellij.openapi.application.impl.ApplicationImpl.createThreadAccessException(ApplicationImpl.java:1083)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1038)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.getDocument(FileDocumentManagerBase.java:46)
	at com.intellij.openapi.fileEditor.FileDocumentManager.getDocument(FileDocumentManager.java:61)
	at com.intellij.psi.impl.PsiDocumentManagerBase.getDocument(PsiDocumentManagerBase.java:173)
	at com.intellij.execution.application.ClassEditorField.createClassField(ClassEditorField.java:83)
	at com.intellij.execution.application.JavaApplicationSettingsEditor.createMainClass(JavaApplicationSettingsEditor.java:51)
	at com.intellij.execution.application.JavaApplicationSettingsEditor.customizeFragments(JavaApplicationSettingsEditor.java:40)
	at com.intellij.execution.application.JavaSettingsEditorBase.createRunFragments(JavaSettingsEditorBase.java:43)
	at com.intellij.execution.ui.RunConfigurationFragmentedEditor.createFragments(RunConfigurationFragmentedEditor.java:62)
	at com.intellij.execution.ui.RunConfigurationFragmentedEditor.createFragments(RunConfigurationFragmentedEditor.java:36)
	at com.intellij.execution.ui.FragmentedSettingsEditor.lambda$new$0(FragmentedSettingsEditor.java:25)
	at com.intellij.openapi.util.NotNullLazyValue$1.compute(NotNullLazyValue.java:61)
	at com.intellij.openapi.util.NotNullLazyValue.getValue(NotNullLazyValue.java:37)
	at com.intellij.execution.ui.FragmentedSettingsEditor.getFragments(FragmentedSettingsEditor.java:43)
	at com.intellij.execution.ui.FragmentedSettingsEditor.getBuilder(FragmentedSettingsEditor.java:91)
	at com.intellij.execution.ui.RunConfigurationFragmentedEditor.getBuilder(RunConfigurationFragmentedEditor.java:80)
	at com.intellij.execution.ui.RunConfigurationFragmentedEditor.getBuilder(RunConfigurationFragmentedEditor.java:36)
	at com.intellij.openapi.options.CompositeSettingsEditor.createEditor(CompositeSettingsEditor.java:94)
	at com.intellij.openapi.options.SettingsEditor.getComponent(SettingsEditor.java:96)
	at com.intellij.execution.ui.RunnerAndConfigurationSettingsEditor.createEditor(RunnerAndConfigurationSettingsEditor.java:91)
	at com.intellij.openapi.options.SettingsEditor.getComponent(SettingsEditor.java:96)
	at com.intellij.openapi.options.SettingsEditor.lambda$resetFrom$0(SettingsEditor.java:73)
	at com.intellij.openapi.options.SettingsEditor.bulkUpdate(SettingsEditor.java:82)
	at com.intellij.openapi.options.SettingsEditor.resetFrom(SettingsEditor.java:72)
	at com.intellij.openapi.options.SettingsEditorConfigurable.reset(SettingsEditorConfigurable.java:39)
	at com.intellij.execution.impl.SingleConfigurationConfigurable.reset(SingleConfigurationConfigurable.java:184)
	at com.intellij.execution.impl.SingleConfigurationConfigurable.editSettings(SingleConfigurationConfigurable.java:117)
	at com.intellij.execution.impl.RunDialog.editConfiguration(RunDialog.java:107)
	at com.khmelyuk.multirun.MultirunRunnerState.checkRunConfiguration(MultirunRunnerState.java:302)
	at com.khmelyuk.multirun.MultirunRunnerState.runConfigurations(MultirunRunnerState.java:101)
	at com.khmelyuk.multirun.MultirunRunnerState.lambda$execute$0(MultirunRunnerState.java:76)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

Same issue in PhpStorm 2023.2.1

lang.Throwable: Assert: must be called on EDT
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68)
at com.intellij.openapi.wm.impl.ToolWindowImpl.setIcon(ToolWindowImpl.kt:448)
at com.intellij.execution.ui.RunContentManagerImpl.updateToolWindowDecoration(RunContentManagerImpl.kt:455)
at com.intellij.execution.ui.RunContentManagerImpl.getOrCreateContentManagerForToolWindow(RunContentManagerImpl.kt:422)
at com.intellij.execution.ui.RunContentManagerImpl.getContentManagerForRunner(RunContentManagerImpl.kt:416)
at com.intellij.execution.ui.RunContentManagerImpl.getReuseContent(RunContentManagerImpl.kt:391)
at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile(ExecutionManagerImpl.kt:243)
at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.kt:205)
at com.intellij.execution.runners.DefaultRunProgramRunner.execute(DefaultRunProgramRunner.kt:18)
at com.khmelyuk.multirun.MultirunRunnerState.runConfigurations(MultirunRunnerState.java:273)
at com.khmelyuk.multirun.MultirunRunnerState.lambda$execute$0(MultirunRunnerState.java:76)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:29)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:24)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)

udmgg commented

Same issue on IntellIJ 2023.2, using Multirun 1.13:

java.lang.Throwable: Assert: must be called on EDT
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68)
at com.intellij.openapi.wm.impl.ToolWindowImpl.setIcon(ToolWindowImpl.kt:448)
at com.intellij.execution.ui.RunContentManagerImpl.updateToolWindowDecoration(RunContentManagerImpl.kt:455)
at com.intellij.execution.ui.RunContentManagerImpl.getOrCreateContentManagerForToolWindow(RunContentManagerImpl.kt:422)
at com.intellij.execution.ui.RunContentManagerImpl.getContentManagerForRunner(RunContentManagerImpl.kt:416)
at com.intellij.execution.ui.RunContentManagerImpl.getReuseContent(RunContentManagerImpl.kt:391)
at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile(ExecutionManagerImpl.kt:216)
at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.kt:178)
at com.intellij.execution.ExecutionManager.startRunProfile(ExecutionManager.kt:72)
at com.khmelyuk.multirun.MultirunRunner.execute(MultirunRunner.java:44)
at com.khmelyuk.multirun.MultirunRunnerState.runConfigurations(MultirunRunnerState.java:273)
at com.khmelyuk.multirun.MultirunRunnerState.lambda$execute$0(MultirunRunnerState.java:76)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)

There's a fork that fixed this error, but it doesn't compile anymore unfortunately - I've forked it and fixed the compilation error here: forkhttps://github.com/seidnerj/multirun/tree/mainline

Anyone this helps feel free to use it (run "git clone" then "grade build") then install from the IDE ("from disk") by choosing zip file named Multirun-1.13.1.zip created under ./build/distributions.

You should have gradle 8.5 installed before building this.

Thank you for coming up with the fix. I'm making a similar change to the main plugin as well, that plan to release with latest IDE version support.

v1.14 is available now. Hopefully it fixes found issues.

So far so well. Thank you for the fix!