Hannah-Sten / TeXiFy-IDEA

LaTeX support for the IntelliJ platform by JetBrains.
https://hannah-sten.github.io/TeXiFy-IDEA
MIT License
884 stars 87 forks source link

Invalid root file in InheritedSdkOrderEntryBridge #2081

Closed sebaminaya0 closed 2 years ago

sebaminaya0 commented 3 years ago

Type of JetBrains IDE

PyCharm 2021.2 build PY-212.4746.96

Operating System

Windows 10 10.0

TeXiFy IDEA version

0.7.9

Description

Stacktrace

java.lang.Throwable: Invalid root file:\\C:\Users\sebas\Documents\BsaleAPI_Integration\venv (invalid) in com.intellij.workspaceModel.ide.impl.legacyBridge.module.roots.InheritedSdkOrderEntryBridge%401d7cf4ea
      at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
      at com.intellij.openapi.roots.impl.RootFileSupplier.ensureValid(RootFileSupplier.java:114)
      at com.intellij.openapi.roots.impl.RootIndex.ensureValid(RootIndex.java:339)
      at com.intellij.openapi.roots.impl.RootIndex.buildRootInfo(RootIndex.java:233)
      at com.intellij.openapi.roots.impl.RootIndex.%3Cinit%3E(RootIndex.java:72)
      at com.intellij.openapi.roots.impl.RootIndex.%3Cinit%3E(RootIndex.java:56)
      at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:176)
      at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:159)
      at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:186)
      at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:96)
      at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getInfoForFileOrDirectory(ProjectFileIndexImpl.java:27)
      at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:100)
      at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:92)
      at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:72)
      at com.jetbrains.python.templateLanguages.PyTemplateLanguageSubstitutor.lambda$getLanguage$2(PyTemplateLanguageSubstitutor.java:36)
      at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:841)
      at com.jetbrains.python.templateLanguages.PyTemplateLanguageSubstitutor.getLanguage(PyTemplateLanguageSubstitutor.java:27)
      at com.intellij.psi.LanguageSubstitutors.substituteLanguage(LanguageSubstitutors.java:58)
      at com.intellij.lang.LanguageUtil.getLanguageForPsi(LanguageUtil.java:48)
      at com.intellij.util.indexing.SubstitutedFileType.substituteFileType(SubstitutedFileType.java:33)
      at com.intellij.util.indexing.IndexedFileImpl.getFileType(IndexedFileImpl.java:41)
      at com.intellij.util.indexing.FileBasedIndexImpl.getAffectedIndexCandidates(FileBasedIndexImpl.java:1462)
      at com.intellij.util.indexing.FileBasedIndexImpl.lambda$scheduleFileForIndexing$32(FileBasedIndexImpl.java:1799)
      at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:638)
      at com.intellij.util.indexing.FileBasedIndexImpl.scheduleFileForIndexing(FileBasedIndexImpl.java:1798)
      at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesToUpdateInReadAction$4(ChangedFilesCollector.java:259)
      at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$5(ChangedFilesCollector.java:283)
      at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
      at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
      at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:223)
      at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$6(ChangedFilesCollector.java:282)
      at com.intellij.util.ConcurrencyUtil.withLock(ConcurrencyUtil.java:234)
      at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$7(ChangedFilesCollector.java:280)
      at com.intellij.util.indexing.events.VfsEventsMerger.processChanges(VfsEventsMerger.java:100)
      at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesInReadAction(ChangedFilesCollector.java:279)
      at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesToUpdateInReadAction(ChangedFilesCollector.java:254)
      at com.intellij.util.indexing.events.ChangedFilesCollector.ensureUpToDate(ChangedFilesCollector.java:215)
      at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:755)
      at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:244)
      at com.intellij.util.indexing.FileBasedIndexEx.processValueIterator(FileBasedIndexEx.java:349)
      at com.intellij.util.indexing.FileBasedIndexEx.processValuesInScope(FileBasedIndexEx.java:318)
      at com.intellij.util.indexing.FileBasedIndexEx.getContainingFiles(FileBasedIndexEx.java:200)
      at com.intellij.psi.search.FileTypeIndex.getFiles(FileTypeIndex.java:42)
      at nl.hannahsten.texifyidea.util.ProjectsKt$allFiles$$inlined$runReadAction$1.compute(actions.kt:62)
      at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:841)
      at nl.hannahsten.texifyidea.util.ProjectsKt.allFiles(Projects.kt:90)
      at nl.hannahsten.texifyidea.ui.symbols.SymbolToolWindowFactory.isApplicable(SymbolToolWindowFactory.kt:46)
      at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.beanToTask(ToolWindowManagerImpl.kt:472)
      at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.access$beanToTask(ToolWindowManagerImpl.kt:88)
      at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$computeToolWindowBeans$$inlined$processDescriptors$1.accept(ToolWindowManagerImpl.kt:2320)
      at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$computeToolWindowBeans$$inlined$processDescriptors$1.accept(ToolWindowManagerImpl.kt:88)
      at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor
PHPirates commented 2 years ago

See #1971,

Can you reproduce this exception? There is a problem with the directory C:\Users\sebas\Documents\BsaleAPI_Integration\venv, maybe it got deleted during some process. Do you have any information about that directory?

Interestingly the error is related to an SDK class which PyCharm does not have, so I'm quite confused what TeXiFy has to do with this directory, the only thing we were trying to do is simply list files in the project.