Hannah-Sten / TeXiFy-IDEA

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

java.lang.IllegalArgumentException: Element from alien project: (Default)4 expected: 664012376; basePathEquals: false; nameEquals: false #3697

Closed jtnorr closed 3 weeks ago

jtnorr commented 1 month ago

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ IDEA 2024.2.3 (build IU-242.23339.11)

Operating System

Windows 11.0 (amd64)

TeXiFy IDEA version

0.9.7

Description

Stacktrace

java.lang.IllegalArgumentException: Element from alien project: (Default)4 expected: 664012376; basePathEquals: false; nameEquals: false
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.ensureMyProject(SmartPointerManagerImpl.java:102)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:82)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:74)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:70)
    at com.intellij.psi.SmartPointerManager.createPointer(SmartPointerManager.java:30)
    at com.intellij.codeInsight.lookup.LookupElementBuilder.withPsiElement(LookupElementBuilder.java:197)
    at nl.hannahsten.texifyidea.completion.LatexBibliographyReferenceProvider.createLookupElementFromBibtexEntry(LatexBibliographyReferenceProvider.kt:57)
    at nl.hannahsten.texifyidea.completion.LatexBibliographyReferenceProvider.addCompletions(LatexBibliographyReferenceProvider.kt:40)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:23)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:157)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81)
    at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.kt:220)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:150)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:138)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:87)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:23)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:157)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81)
    at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.kt:220)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:56)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:130)
    at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:48)
    at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.kt:235)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:974)
    at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:225)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:645)
    at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:224)
    at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:41)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:970)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:958)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:383)
    at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212)
    at com.intellij.codeInsight.completion.CompletionThreadingKt.tryReadOrCancel$lambda$0(CompletionThreading.kt:76)
    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.codeInsight.completion.CompletionThreadingKt.tryReadOrCancel(CompletionThreading.kt:74)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$8(CodeCompletionHandlerBase.java:375)
    at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212)
    at com.intellij.codeInsight.completion.AsyncCompletion.startThread$lambda$1$lambda$0(CompletionThreading.kt:98)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
    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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
    at com.intellij.codeInsight.completion.AsyncCompletion.startThread$lambda$1(CompletionThreading.kt:93)
    at com.intellij.codeInsight.completion.AsyncCompletion$startThread$
PHPirates commented 3 weeks ago

Thanks for reporting! This issue is a duplicate of #3659