Can anyone from JetBrains help me with this one ?

Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:78)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:86)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:190)
at com.intellij.psi.impl.file.impl.FileManagerImpl.a(FileManagerImpl.java:345)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:98)
at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:498)


The source code that raise this error is :

VirtualFileManager.getInstance()
.addVirtualFileListener(new VirtualFileAdapter() {
public void contentsChanged(final VirtualFileEvent event) {

final VirtualFile file = event.getFile();
final PsiManager psiManager = PsiManager.getInstance(_ideaSpringToolWindow.getProject());
final PsiFile psiFile = psiManager.findFile(file);

if (PsiHelper.isConfigFile(psiFile)) {
parse();
}
}
});


Thank you

2 comments

Hi,

The PsiManager.findFile is called during process of project disposal.

Maurice Montgénie wrote:

Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:78)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:86)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:190)
at com.intellij.psi.impl.file.impl.FileManagerImpl.a(FileManagerImpl.java:345)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:98)
at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:498)


The source code that raise this error is :

VirtualFileManager.getInstance()
.addVirtualFileListener(new VirtualFileAdapter() {
public void contentsChanged(final VirtualFileEvent event) {

final VirtualFile file = event.getFile();
final PsiManager psiManager = PsiManager.getInstance(_ideaSpringToolWindow.getProject());
final PsiFile psiFile = psiManager.findFile(file);

if (PsiHelper.isConfigFile(psiFile)) {
parse();
}
}
});


Thank you



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.