Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

ProcessCanceledException must not be thrown from document listeners for real document #228

Open
simon-liebehenschel opened this issue May 22, 2021 · 1 comment

Comments

@simon-liebehenschel
Copy link

Describe the bug

ProcessCanceledException must not be thrown from document listeners for real document

java.lang.Throwable: com.intellij.openapi.progress.ProcessCanceledException: com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.intellij.openapi.roots.ProjectFileIndex because container is already disposed: Project(name=show_changed_files, containerState=DISPOSE_COMPLETED, componentStore=/rock/PyCharmProjects/show_changed_files) (disposed)
at com.intellij.openapi.editor.impl.DocumentImpl$DelayedExceptions.register(DocumentImpl.java:843)
at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:919)
at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:820)
at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:660)
at com.intellij.openapi.editor.impl.DocumentImpl.replaceText(DocumentImpl.java:527)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$3.run(FileDocumentManagerImpl.java:702)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$reloadFromDisk$6(FileDocumentManagerImpl.java:688)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.reloadFromDisk(FileDocumentManagerImpl.java:688)
at com.jetbrains.rdserver.document.BackendFileDocumentManager.reloadFromDisk(BackendFileDocumentManager.kt:11)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.contentsChanged(FileDocumentManagerImpl.java:668)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$MyAsyncFileListener$1.afterVfsChange(FileDocumentManagerImpl.java:609)
at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.afterVfsChange(AsyncEventSupport.java:139)
at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.processEventsFromRefresh(AsyncEventSupport.java:159)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(RefreshSessionImpl.java:227)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$1(RefreshSessionImpl.java:205)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$11(ApplicationImpl.java:923)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$12(ApplicationImpl.java:923)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:947)
at com.intellij.openapi.application.impl.ApplicationImpl.runEdtProgressWriteAction(ApplicationImpl.java:921)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithNonCancellableProgressInDispatchThread(ApplicationImpl.java:902)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$2(RefreshSessionImpl.java:199)
at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:105)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:947)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:973)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:104)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(RefreshSessionImpl.java:198)
at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.lambda$runAsyncListeners$8(RefreshQueueImpl.java:154)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$6(NonBlockingReadActionImpl.java:577)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.intellij.openapi.progress.ProcessCanceledException: com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.intellij.openapi.roots.ProjectFileIndex because container is already disposed: Project(name=show_changed_files, containerState=DISPOSE_COMPLETED, componentStore=/rock/PyCharmProjects/show_changed_files) (disposed)
at com.intellij.serviceContainer.ComponentManagerImpl.throwContainerIsAlreadyDisposed(ComponentManagerImpl.kt:527)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:498)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
at com.intellij.openapi.roots.ProjectFileIndex.getInstance(ProjectFileIndex.java:31)
at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:72)
at com.koxudaxi.poetry.PoetryKt.getModule(poetry.kt:517)
at com.koxudaxi.poetry.PoetryKt.access$getModule(poetry.kt:1)
at com.koxudaxi.poetry.PyProjectTomlWatcher$editorCreated$listener$1.documentChanged(poetry.kt:446)
at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:916)
... 65 more
Caused by: com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.intellij.openapi.roots.ProjectFileIndex because container is already disposed: Project(name=show_changed_files, containerState=DISPOSE_COMPLETED, componentStore=/rock/PyCharmProjects/show_changed_files) (disposed)
at com.intellij.serviceContainer.ComponentManagerImpl.throwContainerIsAlreadyDisposed(ComponentManagerImpl.kt:522)
... 73 more

To Reproduce
Steps to reproduce the behavior:

  1. Run poetry add detect-secrets
  2. See error

Environments (please complete the following information):

  • IDE: PyCharm Community 2021.1
  • OS: Lubuntu 20.04
  • Poetry Version 1.1.6
  • Plugin version 1.1.4
@koxudaxi
Copy link
Owner

@AIGeneratedUsername
Thank you for creating this issue.
OK, I will check it.

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

No branches or pull requests

2 participants