Exception when implementing VFS

I am implementing my own VFS and I get the following Exception when I open a file in an editor. The file opens correctly but this exception is thrown. I am sure I am missing something in my implementation, I'm just not sure what. I've set breakpoints in all of my overridden methods of NewVirtualFileSystem and NewVirtualFile but that hasn't given me any clues.

Thanks!


[ 695390]  ERROR -       #com.intellij.util.Alarm - Accessing invalid virtual file: /apps/geometrixx/components/asseteditor/content.jsp
com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing invalid virtual file: /apps/geometrixx/components/asseteditor/content.jsp
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.c(PersistentFS.java:336)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.readAttribute(PersistentFS.java:230)
at com.intellij.openapi.vfs.newvfs.FileAttribute.readAttribute(FileAttribute.java:57)
at com.intellij.buildfiles.ForcedBuildFileAttribute.getFrameworkIdOfBuildFile(ForcedBuildFileAttribute.java:53)
at com.intellij.lang.ant.ForcedAntFileAttribute.isAntFile(ForcedAntFileAttribute.java:46)
at com.intellij.lang.ant.dom.AntDomFileDescription.isAntFile(AntDomFileDescription.java:53)
at com.intellij.lang.ant.validation.AntAnnotatorsFilter.isProhibited(AntAnnotatorsFilter.java:31)
at com.intellij.lang.ExternalLanguageAnnotators$1.value(ExternalLanguageAnnotators.java:45)
at com.intellij.lang.ExternalLanguageAnnotators$1.value(ExternalLanguageAnnotators.java:41)
at com.intellij.util.containers.ContainerUtil.findAll(ContainerUtil.java:319)
at com.intellij.lang.ExternalLanguageAnnotators.allForFile(ExternalLanguageAnnotators.java:41)
at com.intellij.codeInsight.daemon.impl.ExternalToolPassFactory.a(ExternalToolPassFactory.java:64)
at com.intellij.codeInsight.daemon.impl.ExternalToolPassFactory.createHighlightingPass(ExternalToolPassFactory.java:56)
at com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarImpl$1.execute(TextEditorHighlightingPassRegistrarImpl.java:125)
at gnu.trove.TIntHash.forEach(TIntHash.java:157)
at gnu.trove.TIntObjectHashMap.forEachKey(TIntObjectHashMap.java:389)
at com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarImpl.instantiatePasses(TextEditorHighlightingPassRegistrarImpl.java:118)
at com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.getPasses(TextEditorBackgroundHighlighter.java:95)
at com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.createPassesForEditor(TextEditorBackgroundHighlighter.java:106)
at com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.createPassesForEditor(TextEditorBackgroundHighlighter.java:35)
at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl$6.run(DaemonCodeAnalyzerImpl.java:694)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:229)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:662)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:515)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:411)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

1 comment
Comment actions Permalink

Hello Todd,

Most likely you don't need to implement NewVirtualFileSystem/NewVirtualFile.
"New" in this case does not mean "something everyone should use".

I am implementing my own VFS and I get the following Exception when I
open a file in an editor. The file opens correctly but this exception
is thrown. I am sure I am missing something in my implementation, I'm
just not sure what. I've set breakpoints in all of my overridden
methods of NewVirtualFileSystem and NewVirtualFile but that hasn't
given me any clues.

Thanks!

 #com.intellij.util.Alarm - Accessing invalid virtual file:
> /apps/geometrixx/components/asseteditor/content.jsp
> 
> com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing
> invalid virtual file:
> /apps/geometrixx/components/asseteditor/content.jsp
> 
> at
> com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.c(PersistentFS
> .java:336)
> 
> at
> com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.readAttribute(
> PersistentFS.java:230)
> 
> at
> com.intellij.openapi.vfs.newvfs.FileAttribute.readAttribute(FileAttrib
> ute.java:57)
> 
> at
> com.intellij.buildfiles.ForcedBuildFileAttribute.getFrameworkIdOfBuild
> File(ForcedBuildFileAttribute.java:53)
> 
> at
> com.intellij.lang.ant.ForcedAntFileAttribute.isAntFile(ForcedAntFileAt
> tribute.java:46)
> 
> at
> com.intellij.lang.ant.dom.AntDomFileDescription.isAntFile(AntDomFileDe
> scription.java:53)
> 
> at
> com.intellij.lang.ant.validation.AntAnnotatorsFilter.isProhibited(AntA
> nnotatorsFilter.java:31)
> 
> at
> com.intellij.lang.ExternalLanguageAnnotators$1.value(ExternalLanguageA
> nnotators.java:45)
> 
> at
> com.intellij.lang.ExternalLanguageAnnotators$1.value(ExternalLanguageA
> nnotators.java:41)
> 
> at
> com.intellij.util.containers.ContainerUtil.findAll(ContainerUtil.java:
> 319)
> 
> at
> com.intellij.lang.ExternalLanguageAnnotators.allForFile(ExternalLangua
> geAnnotators.java:41)
> 
> at
> com.intellij.codeInsight.daemon.impl.ExternalToolPassFactory.a(Externa
> lToolPassFactory.java:64)
> 
> at
> com.intellij.codeInsight.daemon.impl.ExternalToolPassFactory.createHig
> hlightingPass(ExternalToolPassFactory.java:56)
> 
> at
> com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistr
> arImpl$1.execute(TextEditorHighlightingPassRegistrarImpl.java:125)
> 
> at gnu.trove.TIntHash.forEach(TIntHash.java:157)
> 
> at gnu.trove.TIntObjectHashMap.forEachKey(TIntObjectHashMap.java:389)
> 
> at
> com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistr
> arImpl.instantiatePasses(TextEditorHighlightingPassRegistrarImpl.java:
> 118)
> 
> at
> com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.g
> etPasses(TextEditorBackgroundHighlighter.java:95)
> 
> at
> com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.c
> reatePassesForEditor(TextEditorBackgroundHighlighter.java:106)
> 
> at
> com.intellij.codeInsight.daemon.impl.TextEditorBackgroundHighlighter.c
> reatePassesForEditor(TextEditorBackgroundHighlighter.java:35)
> 
> at
> com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl$6.run(Daem
> onCodeAnalyzerImpl.java:694)
> 
> at com.intellij.util.Alarm$Request$1.run(Alarm.java:229)
> 
> at
> com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(La
> terInvocator.java:332)
> 
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> 
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
> 
> at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:662)
> 
> at
> com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:515)
> 
> at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:411)
> 
> at
> com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
> 
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
> d.java:269)
> 
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
> ava:184)
> 
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
> d.java:174)
> 
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> 
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> 
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> ]]>


---
Original message URL:
http://devnet.jetbrains.net/message/5317625#5317625


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.