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

com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl.source.tree.CompositeElement of type COMMANDS (class nl.hannahsten.texifyidea.index.stub.LatexCommandsStubElementType) #3282

Closed
zapiz opened this issue Oct 18, 2023 · 1 comment
Labels
crash-report Reports of crashes that popped up in IDEA. duplicate Another issue exists addressing the same problem.

Comments

@zapiz
Copy link

zapiz commented Oct 18, 2023

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

IntelliJ IDEA 2022.1.3 (build IU-221.5921.22)

Operating System

Windows 10 10.0 (amd64)

TeXiFy IDEA version

0.7.18

Description

Stacktrace

com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl.source.tree.CompositeElement of type COMMANDS (class nl.hannahsten.texifyidea.index.stub.LatexCommandsStubElementType)
	at com.intellij.psi.PsiInvalidElementAccessException.createByNode(PsiInvalidElementAccessException.java:80)
	at com.intellij.psi.impl.source.SubstrateRef$2.getContainingFile(SubstrateRef.java:101)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239)
	at nl.hannahsten.texifyidea.util.files.FileSetKt$findReferencedFileSetWithoutCache$roots$1.invoke(FileSet.kt:30)
	at nl.hannahsten.texifyidea.util.files.FileSetKt$findReferencedFileSetWithoutCache$roots$1.invoke(FileSet.kt:30)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.DistinctIterator.computeNext(Sequences.kt:571)
	at kotlin.collections.AbstractIterator.tryToComputeNext(AbstractIterator.kt:42)
	at kotlin.collections.AbstractIterator.hasNext(AbstractIterator.kt:29)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:786)
	at kotlin.sequences.SequencesKt___SequencesKt.toSet(_Sequences.kt:827)
	at nl.hannahsten.texifyidea.util.files.FileSetKt.findReferencedFileSetWithoutCache(FileSet.kt:33)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache.updateCachesFor(ReferencedFileSetCache.kt:81)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache.access$updateCachesFor(ReferencedFileSetCache.kt:20)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache$getSetFromCache$1$1$invokeSuspend$lambda-1$$inlined$runReadAction$1.compute(actions.kt:60)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:920)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache$getSetFromCache$1$1.invokeSuspend(ReferencedFileSetCache.kt:139)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache$getSetFromCache$1$1.invoke(ReferencedFileSetCache.kt)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache$getSetFromCache$1$1.invoke(ReferencedFileSetCache.kt)
	at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$4.invokeSuspend(IntrinsicsJvm.kt:205)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache.getSetFromCache(ReferencedFileSetCache.kt:100)
	at nl.hannahsten.texifyidea.util.files.ReferencedFileSetCache.fileSetFor(ReferencedFileSetCache.kt:55)
	at nl.hannahsten.texifyidea.util.files.impl.ReferencedFileSetServiceImpl.referencedFileSetOf(ReferencedFileSetServiceImpl.kt:15)
	at nl.hannahsten.texifyidea.util.files.FileSetKt.referencedFileSet(FileSet.kt:65)
	at nl.hannahsten.texifyidea.index.IndexUtilBase.getItemsInFileSet(IndexUtilBase.kt:46)
	at nl.hannahsten.texifyidea.util.files.FileSetKt.commandsInFileSet(FileSet.kt:77)
	at nl.hannahsten.texifyidea.inspections.latex.codestyle.LatexFigureNotReferencedInspection.removeReferencedLabels(LatexFigureNotReferencedInspection.kt:48)
	at nl.hannahsten.texifyidea.inspections.latex.codestyle.LatexFigureNotReferencedInspection.inspectFile(LatexFigureNotReferencedInspection.kt:36)
	at nl.hannahsten.texifyidea.inspections.TexifyInspectionBase.checkFile(TexifyInspectionBase.kt:137)
	at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:141)
	at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:60)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:305)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:296)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:213)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:330)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:294)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:294)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:297)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.pr
@zapiz zapiz added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Oct 18, 2023
@PHPirates
Copy link
Collaborator

Thanks for reporting! This issue is a duplicate of #2396 and is fixed in TeXiFy 0.7.19, please update.

@PHPirates PHPirates added duplicate Another issue exists addressing the same problem. and removed untriaged Issue type still needs to be triaged or verified. labels Oct 27, 2023
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. duplicate Another issue exists addressing the same problem.
Projects
None yet
Development

No branches or pull requests

2 participants