question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception: It's prohibited to access index during event dispatching

See original GitHub issue

This happened right after I copied a folder from one location to another within the IDE.

.ignore 2.0.4 / PhpStorm 2017.2.1 / Ubuntu 17.04

It's prohibited to access index during event dispatching
java.lang.Throwable
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
	at com.intellij.openapi.project.NoAccessDuringPsiEvents.checkCallContext(NoAccessDuringPsiEvents.java:38)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:682)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:850)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:936)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:907)
	at com.intellij.util.indexing.FileBasedIndexImpl.getValues(FileBasedIndexImpl.java:758)
	at mobi.hsz.idea.gitignore.indexing.IgnoreFilesIndex.getEntries(IgnoreFilesIndex.java:225)
	at mobi.hsz.idea.gitignore.indexing.IgnoreFilesIndex.getFiles(IgnoreFilesIndex.java:240)
	at mobi.hsz.idea.gitignore.lang.IgnoreLanguage.getOuterFiles(IgnoreLanguage.java:217)
	at mobi.hsz.idea.gitignore.IgnoreManager.isFileIgnored(IgnoreManager.java:284)
	at mobi.hsz.idea.gitignore.vcs.IgnoreFileStatusProvider.getFileStatus(IgnoreFileStatusProvider.java:70)
	at com.intellij.openapi.vcs.impl.FileStatusManagerImpl.calcStatus(FileStatusManagerImpl.java:135)
	at com.intellij.openapi.vcs.impl.FileStatusManagerImpl.getStatus(FileStatusManagerImpl.java:248)
	at com.intellij.openapi.vcs.VcsVFSListener.processMovedFile(VcsVFSListener.java:274)
	at com.intellij.openapi.vcs.VcsVFSListener.addFileToMove(VcsVFSListener.java:265)
	at com.intellij.openapi.vcs.VcsVFSListener.addFileToMove(VcsVFSListener.java:260)
	at com.intellij.openapi.vcs.VcsVFSListener.addFileToMove(VcsVFSListener.java:260)
	at com.intellij.openapi.vcs.VcsVFSListener.access$400(VcsVFSListener.java:44)
	at com.intellij.openapi.vcs.VcsVFSListener$MyVirtualFileListener.beforePropertyChange(VcsVFSListener.java:413)
	at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99)
	at com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35)
	at com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79)
	at com.sun.proxy.$Proxy18.beforePropertyChange(Unknown Source)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireBefore(BulkVirtualFileListenerAdapter.java:115)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.before(BulkVirtualFileListenerAdapter.java:47)
	at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:443)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:404)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:393)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:374)
	at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:45)
	at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:231)
	at com.sun.proxy.$Proxy19.before(Unknown Source)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvents(PersistentFSImpl.java:743)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.a(PersistentFSImpl.java:674)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.renameFile(PersistentFSImpl.java:465)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.rename(VirtualFileSystemEntry.java:211)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.setName(PsiDirectoryImpl.java:107)
	at com.intellij.refactoring.rename.RenameUtil.doRenameGenericNamedElement(RenameUtil.java:234)
	at com.intellij.refactoring.rename.RenamePsiElementProcessor.renameElement(RenamePsiElementProcessor.java:58)
	at com.intellij.refactoring.rename.RenameUtil.doRename(RenameUtil.java:188)
	at com.intellij.refactoring.rename.RenameProcessor.performRefactoring(RenameProcessor.java:380)
	at com.intellij.refactoring.BaseRefactoringProcessor.a(BaseRefactoringProcessor.java:475)
	at com.intellij.refactoring.BaseRefactoringProcessor.a(BaseRefactoringProcessor.java:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:993)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithProgressInDispatchThread(ApplicationImpl.java:993)
	at com.intellij.refactoring.BaseRefactoringProcessor.a(BaseRefactoringProcessor.java:486)
	at com.intellij.refactoring.BaseRefactoringProcessor.a(BaseRefactoringProcessor.java:314)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
	at com.intellij.refactoring.BaseRefactoringProcessor.execute(BaseRefactoringProcessor.java:312)
	at com.intellij.refactoring.BaseRefactoringProcessor.doRun(BaseRefactoringProcessor.java:243)
	at com.intellij.refactoring.rename.RenameProcessor.doRun(RenameProcessor.java:122)
	at com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.disableChecksDuring(NonProjectFileWritingAccessProvider.java:180)
	at com.intellij.refactoring.BaseRefactoringProcessor.run(BaseRefactoringProcessor.java:553)
	at com.intellij.refactoring.ui.RefactoringDialog.invokeRefactoring(RefactoringDialog.java:192)
	at com.intellij.refactoring.rename.RenameDialog.performRename(RenameDialog.java:325)
	at com.intellij.refactoring.rename.RenameDialog.doAction(RenameDialog.java:303)
	at com.intellij.refactoring.rename.RenameWithOptionalReferencesDialog.doAction(RenameWithOptionalReferencesDialog.java:60)
	at com.intellij.refactoring.ui.RefactoringDialog.doRefactorAction(RefactoringDialog.java:97)
	at com.intellij.refactoring.ui.RefactoringDialog$RefactorAction.actionPerformed(RefactoringDialog.java:169)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:208)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:250)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2974)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2966)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6318)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:27)
	at java.awt.Component.dispatchEventImpl(Component.java:4768)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:821)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:622)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.awt.Dialog.show(Dialog.java:1084)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:736)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:458)
	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1686)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1635)
	at com.intellij.refactoring.ui.RefactoringDialog.show(RefactoringDialog.java:64)
	at com.intellij.refactoring.rename.PsiElementRenameHandler.rename(PsiElementRenameHandler.java:198)
	at com.intellij.refactoring.rename.PsiElementRenameHandler.rename(PsiElementRenameHandler.java:169)
	at com.intellij.refactoring.rename.DirectoryAsPackageRenameHandlerBase.a(DirectoryAsPackageRenameHandlerBase.java:130)
	at com.intellij.refactoring.rename.DirectoryAsPackageRenameHandlerBase.invoke(DirectoryAsPackageRenameHandlerBase.java:121)
	at com.intellij.refactoring.actions.BaseRefactoringAction.actionPerformed(BaseRefactoringAction.java:134)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:151)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:231)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:310)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:911)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:136)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:300)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:117)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:109)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:118)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:117)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:821)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mmelvin0commented, Aug 12, 2017

I encountered this same issue when renaming a directory from “modles” (or something) to “models” via Shift-F6. It was a second-level directory and contained a single JSON file.

Here’s the details: https://gist.github.com/mmelvin0/13847be55f015564eccf85c851dba884

Using IDEA 2017.2.1 and .ignore 2.0.4.

@lpbak, @narration-sd, @luispabon please use gist.github.com or equivalent.

0reactions
luispaboncommented, Aug 24, 2017

Issue not found 😉

On Wed, 16 Aug 2017, 01:13 Jakub Chrzanowski notifications@github.com wrote:

Thanks for this report. In fact it’s a duplicate of #404 https://github.com/hsz/idea-gitignore/issues/404

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hsz/idea-gitignore/issues/412#issuecomment-322675981, or mute the thread https://github.com/notifications/unsubscribe-auth/AGF8V6-ha5GUeHgxfIOoZD-COWQCuwsgks5sYoh8gaJpZM4Ow3pT .

– Kind regards, Luis Pabon

Read more comments on GitHub >

github_iconTop Results From Across the Web

It's prohibited to access index during event dispatching · Issue ...
Exception - It's prohibited to access index during event dispatching #369 ... EventDispatcher.dispatch(EventDispatcher.java:99) at ...
Read more >
It's prohibited to access index #Stubs during event dispatching ...
I opened a dialog to create new IDEA project with MPS facet. Build info. Application name: IntelliJ IDEA 2021.1.1. Build number: IC-211.7142.45
Read more >
IntelliJ plugin: Access is allowed from event dispatch thread only
The thing is, that I'm getting an Access is allowed from event dispatch thread only exception when trying to access the editor instance...
Read more >
Exception occurred during event dispatching — oracle-tech
Hi, I frequently get this exception when I click a button in a dialog and it opens up another frame of window.
Read more >
InvalidOperationException Class (System) - Microsoft Learn
Some common causes of InvalidOperationException exceptions · Updating a UI thread from a non-UI thread · Changing a collection while iterating it ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found