Uploaded image for project: 'SonarLint For IntelliJ'
  1. SonarLint For IntelliJ
  2. SLI-583

Error when closing a project while indexing module files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2
    • Component/s: None
    • Labels:
      None

      Description

      Indexing module files can be a long operation and the project could be closed in the meantime. This causes an exception to be thrown: 

      java.lang.Throwable: Directory index is already disposed for Project(name=lorashen.ua, containerState=DISPOSE_COMPLETED, componentStore=/home/roman/PycharmProjects/lorashen.ua) (disposed)
      	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
      	at com.intellij.openapi.roots.impl.DirectoryIndexImpl.checkAvailability(DirectoryIndexImpl.java:234)
      	at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:179)
      	at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:98)
      	at com.intellij.openapi.roots.impl.ModuleFileIndexImpl.getInfoForFileOrDirectory(ModuleFileIndexImpl.java:20)
      	at com.intellij.openapi.roots.impl.FileIndexBase$1.lambda$visitFileEx$0(FileIndexBase.java:45)
      	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:848)
      	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
      	at com.intellij.openapi.roots.impl.FileIndexBase$1.visitFileEx(FileIndexBase.java:45)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:293)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:325)
      	at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:41)
      	at com.intellij.openapi.roots.impl.ModuleFileIndexImpl.iterateContentUnderDirectory(ModuleFileIndexImpl.java:20)
      	at com.intellij.openapi.roots.impl.ModuleFileIndexImpl.iterateContent(ModuleFileIndexImpl.java:35)
      	at com.intellij.openapi.roots.impl.FileIndexBase.iterateContent(FileIndexBase.java:33)
      	at com.intellij.openapi.roots.impl.ModuleFileIndexImpl.iterateContent(ModuleFileIndexImpl.java:20)
      	at org.sonarlint.intellij.module.ModuleFileSystem.files(ModuleFileSystem.kt:44)
      	at org.sonarlint.intellij.module.ModuleFileSystem.files(ModuleFileSystem.kt:36)
      	at org.sonarsource.sonarlint.core.container.module.SonarLintModuleFileSystem.files(SonarLintModuleFileSystem.java:39)
      	at org.sonar.plugins.python.indexer.SonarLintPythonIndexer.getInputFiles(SonarLintPythonIndexer.java:82)
      	at org.sonar.plugins.python.indexer.SonarLintPythonIndexer.buildOnce(SonarLintPythonIndexer.java:59)
      	at org.sonar.plugins.python.PythonScanner.<init>(PythonScanner.java:83)
      	at org.sonar.plugins.python.PythonSensor.execute(PythonSensor.java:106)
      	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:80)
      	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:71)
      	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:133)
      	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:126)
      	at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:111)
      

      We should stop indexing files if the project is disposed

        Attachments

          Activity

            People

            Assignee:
            julien.henry Julien Henry
            Reporter:
            damien.urruty Damien Urruty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: