Bug 476412 - [idea] Invalid virtual file exception after deleting a project from disk
Summary: [idea] Invalid virtual file exception after deleting a project from disk
Status: ASSIGNED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.9.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-02 05:59 EDT by Dennis Huebner CLA
Modified: 2015-09-04 02:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Huebner CLA 2015-09-02 05:59:14 EDT
I've deleted manually some of old idea projects located in ~/IdeaProjects/

After that I've started idea in a new created Xtend project. Builder throws an exception complaining about Invalid file "IdeaProjects/asd" asd was one of deleted projects.

We need to check root is valid in org.eclipse.xtext.idea.build.XtextAutoBuilderComponent.fileDeleted(VirtualFile) before processFilesRecursively and remove the root (and children?) from index.

[ 845669]  ERROR - .impl.MessageBusConnectionImpl - Accessing invalid virtual file: file:///Users/dhuebner/IdeaProjects/asd; original:176974; found:- 
com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing invalid virtual file: file:///Users/dhuebner/IdeaProjects/asd; original:176974; found:-
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.getFileId(PersistentFSImpl.java:337)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.areChildrenLoaded(PersistentFSImpl.java:115)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.getChildren(VirtualDirectoryImpl.java:292)
	at com.intellij.openapi.vfs.VfsUtilCore.processFilesRecursively(VfsUtilCore.java:600)
	at org.eclipse.xtext.idea.build.XtextAutoBuilderComponent.fileDeleted(XtextAutoBuilderComponent.java:382)
	at org.eclipse.xtext.idea.build.XtextAutoBuilderComponent$4.fileDeleted(XtextAutoBuilderComponent.java:258)
	at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:88)
	at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
	at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:68)
	at com.sun.proxy.$Proxy17.fileDeleted(Unknown Source)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireAfter(BulkVirtualFileListenerAdapter.java:85)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.after(BulkVirtualFileListenerAdapter.java:56)
	at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:116)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:368)
    com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:355)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:334)
	at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:42)
	at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:223)
	at com.sun.proxy.$Proxy19.after(Unknown Source)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvents(PersistentFSImpl.java:791)
	at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(RefreshSessionImpl.java:193)
	at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl$1.run(RefreshSessionImpl.java:177)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
	at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(RefreshSessionImpl.java:174)
	at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl$1$1.run(RefreshQueueImpl.java:91)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:335)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
	at java.awt.EventQueue.access$300(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:706)
	at java.awt.EventQueue$3.run(EventQueue.java:704)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:872)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:661)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:396)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForEventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
	at java.awt.Dialog.show(Dialog.java:1082)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:777)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:463)
	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1617)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1574)
	at com.intellij.openapi.fileChooser.ex.FileChooserDialogImpl.choose(FileChooserDialogImpl.java:133)
	at com.intellij.openapi.fileChooser.FileChooser.chooseFiles(FileChooser.java:55)
	at com.intellij.openapi.fileChooser.FileChooser.chooseFiles(FileChooser.java:46)
	at org.jetbrains.idea.maven.project.actions.AddManagedFilesAction.actionPerformed(AddManagedFilesAction.java:52)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:161)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:125)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:299)
	at java.awt.Component.processEvent(Component.java:6281)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4872)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
	at java.awt.EventQueue.access$300(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:706)
	at java.awt.EventQueue$3.run(EventQueue.java:704)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.awt.EventQueue$4.run(EventQueue.java:718)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:872)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:657)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:396)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 1 Eclipse Genie CLA 2015-09-04 02:34:52 EDT
GitHub Pull Request 528 created by [dhuebner]
https://github.com/eclipse/xtext/pull/528