sourcegraph / jetbrains

Apache License 2.0
73 stars 23 forks source link

bug: com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed #2620

Open edwinpiekart opened 1 day ago

edwinpiekart commented 1 day ago

IDE Information

IntelliJ IDEA 2024.2.4 (Ultimate Edition) Build #IU-242.23726.103, built on October 23, 2024 Licensed to Edwin Piekart Subscription is active until June 26, 2025. Runtime version: 21.0.4+13-b509.26 amd64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.awt.X11.XToolkit Linux 5.4.0-200-generic GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 2560M Cores: 8 Registry: ide.experimental.ui=true i18n.locale= eslint.additional.file.extensions=svelte terminal.new.ui=true Non-Bundled Plugins: com.intellij.notebooks.core (242.23726.16) PythonCore (242.23726.103) org.jetbrains.plugins.go-template (242.20224.155) name.kropp.intellij.makefile (242.23726.16) org.jetbrains.plugins.go (242.23726.16) org.jetbrains.plugins.ruby (242.23726.38) com.jetbrains.packagesearch.intellij-plugin (242.0.12) Pythonid (242.23726.103) intellij.jupyter (242.23726.16) org.intellij.prisma (242.23726.38) dev.blachut.svelte.lang (242.23726.38) com.sourcegraph.jetbrains (7.0.18) ee.carlrobert.chatgpt (2.12.3-241.1) ru.adelf.idea.dotenv (2024.2.1) com.github.copilot (1.5.28.7313) Kotlin: 242.23726.103-IJ Current Desktop: ubuntu:GNOME

Bug Description

This problem appear when opening next Intellij Idea window. First one with Ruby on Rails app, second one with NextJS app.

Additional context

Stacktrace:


com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed
    at com.intellij.serviceContainer.ComponentManagerImplKt.throwAlreadyDisposedIfNotUnderIndicatorOrJob(ComponentManagerImpl.kt:1672)
    at com.intellij.serviceContainer.ComponentManagerImplKt.access$throwAlreadyDisposedIfNotUnderIndicatorOrJob(ComponentManagerImpl.kt:1)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:716)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690)
    at com.sourcegraph.cody.agent.CodyAgentService$Companion.getInstance(CodyAgentService.kt:227)
    at com.sourcegraph.cody.agent.CodyAgentService$Companion.withAgent$lambda$2(CodyAgentService.kt:191)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: com.intellij.platform.instanceContainer.internal.ContainerDisposedException: Container 'ProjectImpl@295361786 services' was disposed
    at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.state(InstanceContainerImpl.kt:60)
    at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.state(InstanceContainerImpl.kt:40)
    at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.getInstanceHolder(InstanceContainerImpl.kt:277)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:712)
    ... 15 more
Caused by: com.intellij.platform.instanceContainer.internal.DisposalTrace
    at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.dispose(InstanceContainerImpl.kt:266)
    at com.intellij.serviceContainer.ComponentManagerImpl.dispose(ComponentManagerImpl.kt:1164)
    at com.intellij.openapi.project.impl.ProjectImpl.dispose(ProjectImpl.kt:321)
    at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:131)
    at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:163)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:205)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:193)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject$lambda$15(ProjectManagerImpl.kt:423)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction$lambda$4(AnyThreadWriteThreadingSupport.kt:318)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:328)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:318)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:890)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject(ProjectManagerImpl.kt:406)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject$default(ProjectManagerImpl.kt:328)
    at com.intellij.openapi.project.impl.ProjectManagerImpl$closeAndDisposeKeepingFrame$2$1.invoke(ProjectManagerImpl.kt:981)
    at com.intellij.openapi.project.impl.ProjectManagerImpl$closeAndDisposeKeepingFrame$2$1.invoke(ProjectManagerImpl.kt:979)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:339)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:232)
    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:62)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:231)
    at com.intellij.openapi.project.impl.ProjectManagerImpl$closeAndDisposeKeepingFrame$2.invokeSuspend(ProjectManagerImpl.kt:979)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:44)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:211)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQu...
linear[bot] commented 1 day ago

BUGS-712 bug: com.intellij.serviceContainer.AlreadyDisposedException: Container is already disposed