Skip to content

Conflicting StubFileElementTypes when closing project #1083

@LvargaDS

Description

@LvargaDS

Describe the bug
LOW priority.

When I have project with robot file opened and I choose to open other project, intelij idea asks me, if I want to open that other project in "this window" or in new one. I have chosen "This window" and error have appeared.

To Reproduce
Steps to reproduce the behavior:

  1. Open project with robot file (just an directory with two robot files, one gitlab ci file and readme.
  2. Click File->Open recent and choose any recent project (maven, java in my case no robot framework related project)
  3. Choose to open given project in "This window"
  4. Error pops up

Expected behavior
Project switching without an error.

Screenshots
roboterror

NOTE: "report to robocorp" link does not point here, but to your company. I like what your company does do, but finding this github project was some time, which can discourage many people to report bug.

Versions:

  • OS: Ubuntu
  • Robot Framework Version: [e.g. 3.2]
  • Robot Framework Language Server Version: 1.11.1
  • Client Version: [e.g.: VSCode 1.46 or PyCharm 2020.1.2]

Logs
Please request logs from me, if needed. It seems a bit long process. If it are essential to this bug, Ill obtain them.

stacktrace.txt

com.intellij.diagnostic.PluginException: Cannot distinguish StubFileElementTypes. This might worsen the performance. Providing unique externalId or adding a distinctive debugName when instantiating StubFileElementTypes can help (override getExternalId() and/or getDebugName() in StubFileElementType). See attachment for additional information. [Plugin: robocorp.lsp.intellij]
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.reportStubFileElementTypeVersionConflict(PerFileElementTypeStubModificationTracker.java:294)
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.lambda$determinePreviousFileElementType$8(PerFileElementTypeStubModificationTracker.java:269)
	at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.determinePreviousFileElementType(PerFileElementTypeStubModificationTracker.java:265)
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.fastCheck(PerFileElementTypeStubModificationTracker.java:159)
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.lambda$endUpdatesBatch$3(PerFileElementTypeStubModificationTracker.java:120)
	at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:54)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:228)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at com.intellij.openapi.application.ReadAction.run(ReadAction.java:53)
	at com.intellij.psi.stubs.PerFileElementTypeStubModificationTracker.endUpdatesBatch(PerFileElementTypeStubModificationTracker.java:119)
	at com.intellij.util.indexing.events.ChangedFilesCollector$4.endBatch(ChangedFilesCollector.java:217)
	at com.intellij.util.indexing.events.ChangedFilesCollector$5.lambda$endBatch$2(ChangedFilesCollector.java:254)
	at com.intellij.util.ConcurrencyUtil.withLock(ConcurrencyUtil.java:264)
	at com.intellij.util.indexing.events.ChangedFilesCollector$5.endBatch(ChangedFilesCollector.java:253)
	at com.intellij.util.indexing.events.VfsEventsMerger.processChanges(VfsEventsMerger.java:127)
	at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesInReadAction(ChangedFilesCollector.java:236)
	at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesToUpdateInReadAction(ChangedFilesCollector.java:184)
	at com.intellij.util.indexing.FileBasedIndexScanUtil.ensureUpToDate(FileBasedIndexScanUtil.java:53)
	at com.intellij.util.indexing.FileBasedIndexScanUtil.getIndexData(FileBasedIndexScanUtil.java:60)
	at com.intellij.psi.impl.cache.impl.IndexTodoCacheManagerImpl.getTodoMapFromIndex(IndexTodoCacheManagerImpl.java:133)
	at com.intellij.psi.impl.cache.impl.IndexTodoCacheManagerImpl.getTodoMap(IndexTodoCacheManagerImpl.java:119)
	at com.intellij.psi.impl.cache.impl.IndexTodoCacheManagerImpl.getTodoCountImpl(IndexTodoCacheManagerImpl.java:105)
	at com.intellij.psi.impl.cache.impl.IndexTodoCacheManagerImpl.getTodoCount(IndexTodoCacheManagerImpl.java:94)
	at com.intellij.psi.impl.search.IndexPatternSearcher.processQuery(IndexPatternSearcher.java:61)
	at com.intellij.psi.impl.search.IndexPatternSearcher.processQuery(IndexPatternSearcher.java:41)
	at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:76)
	at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:30)
	at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:83)
	at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
	at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:24)
	at com.intellij.util.Query.iterator(Query.java:127)
	at com.intellij.util.AbstractQuery.iterator(AbstractQuery.java:34)
	at java.base/java.lang.Iterable.forEach(Iterable.java:74)
	at com.intellij.psi.impl.search.PsiTodoSearchHelperImpl.findTodoItems(PsiTodoSearchHelperImpl.java:51)
	at com.intellij.psi.impl.search.PsiTodoSearchHelperImpl.findTodoItems(PsiTodoSearchHelperImpl.java:42)
	at com.intellij.codeInsight.daemon.impl.TodoHighlightVisitor.highlightTodos(TodoHighlightVisitor.java:55)
	at com.intellij.codeInsight.daemon.impl.TodoHighlightVisitor.analyze(TodoHighlightVisitor.java:36)
	at com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.lambda$runVisitors$4(HighlightVisitorRunner.java:120)
	at com.intellij.concurrency.ApplierCompleter.processArrayItem(ApplierCompleter.java:116)
	at com.intellij.concurrency.ApplierCompleter.processArray(ApplierCompleter.java:196)
	at com.intellij.concurrency.ApplierCompleter.execAll(ApplierCompleter.java:166)
	at com.intellij.concurrency.ApplierCompleter.lambda$exec$0(ApplierCompleter.java:105)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$2(ApplierCompleter.java:148)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:159)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapAndRun$1(ApplierCompleter.java:140)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader(AnyThreadWriteThreadingSupport.kt:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.concurrency.ApplierCompleter.wrapAndRun(ApplierCompleter.java:140)
	at com.intellij.concurrency.ApplierCompleter.exec(ApplierCompleter.java:108)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)

element-types.txt

StubFileElementType version: psi.file:0:FILE
List of suitable conflicting StubFileElementTypes:
robocorp.robot.intellij.RobotParserDefinition$1: plugin=robocorp.lsp.intellij, language=Language: RobotFramework, externalId=psi.file, debugName=FILE
com.intellij.psi.tree.IStubFileElementType: plugin=null, language=Language: ANY, externalId=psi.file, debugName=FILE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions