Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IncorrectOperationException thrown by intellij Plugin #394

Open
fawind opened this issue Aug 21, 2024 · 1 comment
Open

IncorrectOperationException thrown by intellij Plugin #394

fawind opened this issue Aug 21, 2024 · 1 comment

Comments

@fawind
Copy link

fawind commented Aug 21, 2024

What happened?

Intellij reports the following "IDE Internal Error" that's caused by the gradle-jdks intellij plugin.

I believe this happens when the Intellij embedded terminal window is in focus while the below code runs.

Stacktrace:
com.intellij.util.IncorrectOperationException: Sorry but parent: com.intellij.execution.impl.ConsoleViewImpl[,0,0,2560x292,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=] (class com.intellij.execution.impl.ConsoleViewImpl) has already been disposed (see the cause for stacktrace) so the child: com.intellij.util.Alarm@6683437c (class com.intellij.util.Alarm) will never be disposed
	at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
	at com.intellij.openapi.util.Disposer.register(Disposer.java:161)
	at com.intellij.util.Alarm.<init>(Alarm.java:145)
	at com.intellij.execution.impl.ProcessStreamsSynchronizer.<init>(ProcessStreamsSynchronizer.java:52)
	at com.intellij.execution.impl.ConsoleViewRunningState.<init>(ConsoleViewRunningState.java:49)
	at com.intellij.execution.impl.ConsoleViewImpl$1.attachTo(ConsoleViewImpl.java:167)
	at com.intellij.execution.impl.ConsoleViewImpl.attachToProcess(ConsoleViewImpl.java:313)
	at com.palantir.gradle.jdks.GradleJdksProjectService.setupGradleJdks(GradleJdksProjectService.java:108)
	at com.palantir.gradle.jdks.GradleJdksProjectService.maybeSetupGradleJdks(GradleJdksProjectService.java:93)
	at com.palantir.gradle.jdks.GradleJdksExternalSystemTaskNotificationListener.onStart(GradleJdksExternalSystemTaskNotificationListener.java:33)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl$onStart$1.invoke(ExternalSystemProgressNotificationManagerImpl.kt:39)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl$onStart$1.invoke(ExternalSystemProgressNotificationManagerImpl.kt:39)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl$forEachListener$1$1.invoke(ExternalSystemProgressNotificationManagerImpl.kt:95)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl$forEachListener$1$1.invoke(ExternalSystemProgressNotificationManagerImpl.kt:95)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl.forEachListener$lambda$3$lambda$2(ExternalSystemProgressNotificationManagerImpl.kt:95)
	at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.kt:32)
	at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.kt:49)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl.forEachListener(ExternalSystemProgressNotificationManagerImpl.kt:95)
	at com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl.onStart(ExternalSystemProgressNotificationManagerImpl.kt:39)
	at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:89)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:133)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.executeImpl(ExternalSystemUtil.java:497)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:329)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:617)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:478)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:477)
	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)
Caused by: java.lang.Throwable
	at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:101)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:161)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:262)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:250)
	at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:282)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:220)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:214)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel.closeContent(ContentTabLabel.java:161)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel$CloseContentTabAction.runAction(ContentTabLabel.java:238)
	at com.intellij.openapi.wm.impl.content.AdditionalIcon.runAction(AdditionalIcon.kt:20)
	at com.intellij.openapi.wm.impl.content.ContentLabel.handleActionsClick(ContentLabel.java:97)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel.handleMouseClick(ContentTabLabel.java:47)
	at com.intellij.openapi.wm.impl.content.ContentLabel$1.execute(ContentLabel.java:41)
	at com.intellij.util.ui.BaseButtonBehavior$MyMouseListener.execute(BaseButtonBehavior.java:213)
	at com.intellij.util.ui.BaseButtonBehavior$MyMouseListener.mouseReleased(BaseButtonBehavior.java:195)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
	at java.desktop/java.awt.Component.processEvent(Component.java:6422)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4954)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4581)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4522)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2808)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:791)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:762)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:633)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:588)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

It's not blocking or causing any issues, just triggers the noisy intellij popup.

@felixdesouza
Copy link

I think this blocks subsequent imports, as I just get IDE Error occurred. It probably works out fine if you're switching branches and you already have the jdks, but I imagine if you didn't you'll be a bit stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants