I’m trying to add another automated regression test that executes an inspection profile against a set of open source/reference projects using the latest build of my plugin, checking the latest JSON or XML results for each project against a set of reference results to see if anything has changed.
I’m able to execute the inspections in a headless manner effectively following this:
but specifying the same JVM args to have it act as a plugin sandbox install.
The issue is that after it processes a few projects – the exact number is variable – the next execution fails with:
[java] 2026-06-06 15:18:56,630 [ 4648] WARN - #c.i.o.v.n.i.VirtualFileSystemEntry - com.intellij.serviceContainer.AlreadyDisposedException: VFS is disconnected, all it's files are invalid now
[java] java.lang.Exception: com.intellij.serviceContainer.AlreadyDisposedException: VFS is disconnected, all it's files are invalid now
[java] at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.isValid(VirtualFileSystemEntry.java:638)
[java] at com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl.isIgnored$lambda$0(ProjectLevelVcsManagerImpl.kt:526)
[java] at com.intellij.openapi.application.impl.AppImplKt$rethrowCheckedExceptions$2.invoke(appImpl.kt:126)
[java] at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runReadAction(NestedLocksThreadingSupport.kt:854)
[java] at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:1109)
[java] at com.intellij.openapi.application.ReadAction.computeBlocking(ReadAction.java:88)
[java] at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:70)
[java] at com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl.isIgnored(ProjectLevelVcsManagerImpl.kt:524)
[java] at com.intellij.openapi.vcs.impl.projectlevelman.NewMappings.getMappedRootFor(NewMappings.java:637)
[java] at com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl.getVcsRootFor(ProjectLevelVcsManagerImpl.kt:146)
[java] at git4idea.commands.GitImplBase.getPresentableRootName(GitImplBase.java:239)
[java] at git4idea.commands.GitImplBase.doRun(GitImplBase.java:220)
[java] at git4idea.commands.GitImplBase.run(GitImplBase.java:186)
[java] at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:75)
[java] at git4idea.repo.GitRecentCheckoutBranches.collectRecentCheckoutBranches(GitRecentCheckoutBranches.kt:33)
[java] at git4idea.repo.GitRepositoryImpl.readRepoInfo(GitRepositoryImpl.kt:216)
[java] at git4idea.repo.GitRepositoryImpl.update(GitRepositoryImpl.kt:189)
[java] at git4idea.status.GitChangesCollector.getHead(GitChangesCollector.java:233)
[java] at git4idea.status.GitChangesCollector.collect(GitChangesCollector.java:57)
[java] at git4idea.status.GitChangeProvider.getChanges(GitChangeProvider.java:98)
[java] at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.actualUpdate(ChangeListManagerImpl.java:753)
[java] at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.iterateScopes(ChangeListManagerImpl.java:669)
[java] at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$13(ChangeListManagerImpl.java:572)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:744)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:819)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:775)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:743)
[java] at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
[java] at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$16(ChangeListManagerImpl.java:571)
[java] at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$13(BackgroundTaskUtil.java:358)
[java] at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$15(BackgroundTaskUtil.java:387)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:283)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:744)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:819)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:775)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:743)
[java] at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
[java] at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:267)
[java] at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:382)
[java] at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:357)
[java] at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:349)
[java] at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.updateImmediately(ChangeListManagerImpl.java:521)
[java] at com.intellij.openapi.vcs.changes.UpdateRequestsQueue$RefreshRunnable.run(UpdateRequestsQueue.java:284)
[java] at com.intellij.openapi.vcs.changes.ChangeListScheduler$schedule$future$1.invokeSuspend(ChangeListScheduler.kt:34)
[java] at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
[java] at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
[java] at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
[java] at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
[java] at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:610)
[java] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1188)
[java] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:775)
[java] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:762)
[java] Caused by: com.intellij.serviceContainer.AlreadyDisposedException: VFS is disconnected, all it's files are invalid now
[java] at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.owningDiscrepancyError(VirtualFileSystemEntry.java:177)
[java] at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.isValid(VirtualFileSystemEntry.java:634)
[java] ... 51 more
As a result, I’m struggling to get complete and consistent results in this manner.
Note that there is no IDE process running against the same sandbox install when this happens.
Does anyone know why this might be happening? Has anyone else out there set up this type of automated regression test using the IDE’s ability to perform batch inspection runs from the command-line? It seems like it’d be a very useful test to have as part of the overall regression suite, but right now it seems too fragile to be useful.