ArtsiomCh / CMake

IntelliJ Platform plugin for CMake basic syntax highlight.
https://plugins.jetbrains.com/plugin/10089-cmake-simple-highlighter
GNU General Public License v3.0
44 stars 7 forks source link

[Exception][CLion 2023.1.3] com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing invalid virtual fil... #50

Open JAMonschke opened 1 year ago

JAMonschke commented 1 year ago

User Description

Stack Trace

com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing invalid virtual file: mock:///CMakeLists.txt; original:1996679885; found:-; file system=com.intellij.testFramework.LightVirtualFileBase$MyVirtualFileSystem@1a54debc
    at com.intellij.psi.impl.file.impl.FileManagerImpl.getCachedPsiFile(FileManagerImpl.java:371)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getCachedPsiFile(PsiDocumentManagerBase.java:144)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getCachedPsiFile(PsiDocumentManagerBase.java:126)
    at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.registerDocument(InjectionRegistrarImpl.java:474)
    at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.createOrMergeInjectedFile(InjectionRegistrarImpl.java:295)
    at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.createAndRegisterInjected(InjectionRegistrarImpl.java:265)
    at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.doneInjecting(InjectionRegistrarImpl.java:223)
    at com.cmakeplugin.CMakeRegexMultiHostInjector.getLanguagesToInject(CMakeRegexMultiHostInjector.kt:47)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:445)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUpInner(InjectedLanguageUtilBase.java:238)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.lambda$probeElementsUp$0(InjectedLanguageUtilBase.java:218)
    at com.intellij.openapi.application.impl.ReadActionCacheIml$allowInWriteAction$1.invoke(ReadActionCacheIml.kt:22)
    at com.intellij.openapi.application.impl.ReadActionCacheIml$allowInWriteAction$1.invoke(ReadActionCacheIml.kt:22)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction$lambda$0(ReadActionCacheIml.kt:18)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.allowProcessingContextInWriteAction(ReadMostlyRWLock.java:204)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction(ReadActionCacheIml.kt:18)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction(ReadActionCacheIml.kt:22)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:217)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:159)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:329)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspectInjectedPsi(InspectionRunner.java:375)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:277)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:138)
    at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollec

<TRIMMED STACKTRACE>

Other Information

=== About ===
Build version: CLion 2023.1.3 Build: #CL-231.9011.31 May 15, 2023
Theme: Darcula
JRE: 17.0.6+10-b829.9, JetBrains s.r.o.
JVM: 17.0.6+10-b829.9, OpenJDK 64-Bit Server VM, JetBrains s.r.o.
Operating System: Mac OS X 13.4 (x86_64)

=== Plugins ===
Custom plugins: [GitToolBox (500.0.10+213), Git Machete (4.0.0), GitLab Pipeline Viewer (2.14.2), Iterm Plugin (0.0.8), CMake Plus (231.1.0), idea-sourcetrail (0.4.9), EditorConfig (231.8770.3), Sourcegraph (2.1.4), CMake simple highlighter (231.1.0), C/C++ Single File Execution (1.3), Properties (231.8770.3), CodeGlance Pro (1.6.5), Grep Console (12.18.211.6693.0), Key Promoter X (2023.1.0), AsciiDoc (0.38.17), RegexpTester (1.0.8)]
Disabled plugins:[Git Scope (3.0.6), Twilight Color Scheme (231.9011.31), All Hallow's Eve Color Scheme (231.9011.31), QtCreator Keymap (231.9011.31), Docker (231.9011.31), Custom Defined Compiler Support (231.9011.31), Task Management (231.9011.31), Compiler Explorer (2.6), Monokai Color Scheme (231.9011.31), Cobalt Color Scheme (231.9011.31), VibrantInk Color Scheme (231.9011.31), CSS (231.9011.31), CLion-cpplint (1.0.7), Railscasts Color Scheme (231.9011.31), CLion Solarized Color Scheme (231.9011.31), QML (231.9011.31), NetBeans Keymap (231.9011.31), Dart (231.9065), Visual Studio Keymap (231.9011.31), TSLint (231.9011.31), Eclipse Keymap (231.9011.31), Blackboard Color Scheme (231.9011.31), Next.js Support (231.9011.31), Rust (0.4.196.5423-231), CLion Catch (231.9011.31), Time Tracking (231.9011.31), Mercurial (231.9011.31), Tailwind CSS (231.9011.31), Find Pull Request (1.7.2), PlantUML Integration (6.3.0-IJ2022.2), PostCSS (231.9011.31), FTP/SFTP/WebDAV Connectivity (231.9011.31), ClangFormat (231.9011.31), Makefile (231.9011.31), Json Formatter (1.4), Remote Hosts Data Access (231.9011.31), Terminal for Gateway (231.9011.31), Vue.js (231.9011.31), HTTP Client (231.9011.31), JavaScript Debugger (231.9011.31), Webpack (231.9011.31), Vite (231.9011.31), Database Tools and SQL (231.9011.31), Copyright (231.9011.31), Json Helper (1.2.0), Node.js (231.9011.31), JavaScript Intention Power Pack (231.9011.31), Perforce Helix Core (231.9011.31), cppcheck (1.6.2), Karma (231.9011.31), Polymer & Web Components (231.9011.31), JavaScript and TypeScript (231.9011.31), Embedded Development Support (231.9011.31), Angular and AngularJS (231.9011.31), XPathView + XSLT (231.9011.31), C/C++ Package Manager (231.9011.31), ReSharper Keymap (231.9011.31), Prettier (231.9011.31), Xcode Keymap (231.9011.31), HTML Tools (231.9011.31), Dawn Color Scheme (231.9011.31), GitHub Color Scheme (231.9011.31), SSH Remote Run (231.9011.31), Xcode Color Scheme (231.9011.31), Terminal (231.9011.31), Remote Development Gateway (231.9011.31), WarmNeon Color Scheme (231.9011.31), CLion Doctest (231.9011.31), Code With Me (231.9011.31), Styled Components & Styled JSX (231.9011.31), Less (231.9011.31), Makefile Language (231.9011.31), Sass (231.9011.31), SonarLint (8.3.0.71062), Quick Notes (3.3), Gitlab Helper (2.3.1), Subversion (231.9011.31), Espresso Color Scheme (231.9011.31), Json Parser (1.4.1), Node.js Remote Interpreter (231.9011.31), Space (231.9011.31), CLion Boost.Test (231.9011.31)]
JAMonschke commented 1 year ago

Also associated with exception in CLion core. submitted as 15383733. Stack trace :

java.lang.AssertionError: host committed: true, window=DocumentWindow (delegate=DocumentImpl[file:///Users/jmonschke/git/splunk2/main/CMakeLists.txt])
    at com.intellij.psi.impl.PsiDocumentManagerBase.getLastCommittedDocument(PsiDocumentManagerBase.java:790)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getLastCommittedText(PsiDocumentManagerBase.java:767)
    at com.intellij.psi.AbstractFileViewProvider.getLastCommittedText(AbstractFileViewProvider.java:490)
    at com.intellij.psi.AbstractFileViewProvider.access$200(AbstractFileViewProvider.java:49)
    at com.intellij.psi.AbstractFileViewProvider$VirtualFileContent.getText(AbstractFileViewProvider.java:456)
    at com.intellij.psi.AbstractFileViewProvider.getContents(AbstractFileViewProvider.java:154)
    at com.intellij.psi.impl.source.PsiFileImpl.getText(PsiFileImpl.java:313)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.addInjectedPsiHighlights(InjectedGeneralHighlightingPass.java:237)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$collectInformationWithProgress$3(InjectedGeneralHighlightingPass.java:80)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$processInjectedPsiFiles$5(InjectedGeneralHighlightingPass.java:173)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUpInner(InjectedLanguageUtilBase.java:252)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.lambda$probeElementsUp$0(InjectedLanguageUtilBase.java:218)
    at com.intellij.openapi.application.impl.ReadActionCacheIml$allowInWriteAction$1.invoke(ReadActionCacheIml.kt:22)
    at com.intellij.openapi.application.impl.ReadActionCacheIml$allowInWriteAction$1.invoke(ReadActionCacheIml.kt:22)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction$lambda$0(ReadActionCacheIml.kt:18)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.allowProcessingContextInWriteAction(ReadMostlyRWLock.java:204)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction(ReadActionCacheIml.kt:18)
    at com.intellij.openapi.application.impl.ReadActionCacheIml.allowInWriteAction(ReadActionCacheIml.kt:22)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:217)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:159)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:329)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$processInjectedPsiFiles$6(InjectedGeneralHighlightingPass.java:171)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:229)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:187)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
JAMonschke commented 1 year ago

Possibly tied to the window that contained the tab with this file (which was the active tab) being made very narrow.

ArtsiomCh commented 1 year ago

Thanks for reporting! Was it one time exception or you experiencing it often? Based on stacktrace looks like some occasional glitch at IDE internals...