Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jtnorr opened this issue Dec 10, 2024 · 5 comments · Fixed by #3803
Labels
crash-report Reports of crashes that popped up in IDEA.
Milestone

Comments

@jtnorr
Copy link

jtnorr commented Dec 10, 2024

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

IntelliJ IDEA 2024.3.1 (build IU-243.22562.145)

Operating System

Windows 11.0 (amd64)

TeXiFy IDEA version

0.9.9

Description

Stacktrace

java.lang.IllegalArgumentException: Element from alien project: (Default)4 expected: 482982042; basePathEquals: false; nameEquals: false
	at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.ensureMyProject(SmartPointerManagerImpl.java:99)
	at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:79)
	at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:71)
	at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.createSmartPsiElementPointer(SmartPointerManagerImpl.java:67)
	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:58)
	at nl.hannahsten.texifyidea.completion.LatexBibliographyReferenceProvider.addCompletions(LatexBibliographyReferenceProvider.kt:41)
	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:217)
	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:217)
	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:232)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:962)
	at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:230)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:113)
	at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:682)
	at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:229)
	at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:41)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:958)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:946)
	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:351)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
	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$1(CoreProgressManager.java:223)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:45)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:222)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:674)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:749)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:673)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressMa
@jtnorr jtnorr added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Dec 10, 2024
@jtnorr
Copy link
Author

jtnorr commented Dec 10, 2024

Got an error with different log from #3697 that I previously had issues with. Will gladly provide more information if needed.

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Dec 11, 2024
@PHPirates
Copy link
Collaborator

Thanks, I'm indeed confused because this should have been fixed last time. Can you somehow reproduce this exception? It is related to autocompletion for bibtex entries that are in a bib file outside the project.

@PHPirates PHPirates added this to the Next milestone Dec 11, 2024
@jtnorr
Copy link
Author

jtnorr commented Dec 11, 2024

I will try to reproduce this exception and report back here. I think it is indeed related to a .bib file in the project folder that is not included in the .tex file. This was the case for the project I was working on.

@jtnorr
Copy link
Author

jtnorr commented Dec 12, 2024

I can't seem to be able to replicate the issue anymore. I think it was related to the automatic syncinc of Zotero library because the issue was alleviated as soon as I deleted the sync and started using the Better Bibtex addon to automatically export the references. Now after adding the sync back, it seems to be working without causing any issues or throwing any errors.

I will update here, should I notice any errors seemingly related to this issue in my future work.

@PHPirates
Copy link
Collaborator

Thanks for checking! I can't reproduce it either, I will try my best guess to fix it and then we will see if it comes back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash-report Reports of crashes that popped up in IDEA.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants