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.openapi.diagnostic.RuntimeExceptionWithAttachments: PSI and index do not match. #3897

Closed
ITModernisation opened this issue Feb 7, 2025 · 3 comments
Labels
crash-report Reports of crashes that popped up in IDEA.

Comments

@ITModernisation
Copy link

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

IntelliJ IDEA 2024.3.2.2 (build IU-243.23654.189)

Operating System

Linux 6.8.0-52-generic (amd64)

TeXiFy IDEA version

0.10.0

Description

Stacktrace

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: PSI and index do not match.
Please report the problem to JetBrains with the files attached
 file=LaTeX source file, file.class=class nl.hannahsten.texifyidea.file.LatexFile, file.lang=Language: Latex, modStamp=1
 tree consistent
 stub debugInfo=created in getStubTree(), with AST = false; with backReference
 viewProvider=com.intellij.psi.SingleRootFileViewProvider{vFile=file:///home/esc/IdeaProjects/doc/method/rail.sty, vFileId=130907, content=VirtualFileContent{size=29518}, eventSystemEnabled=true}
 viewProvider stamp: 0; file stamp: 0; file modCount: 1738937951457; file length: 29518
 doc saved: true; doc stamp: 0; doc size: 0; committed: true
indexing info: indexing timestamp = 1738937951457, binary = false, byte size = 29518, char size = 29518
ref: 50cf572587cf
latestIndexedStub=null
	at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.doCreateCompleteException(StubTreeLoader.java:219)
	at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.lambda$createCompleteException$0(StubTreeLoader.java:194)
	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.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:291)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:291)
	at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.createCompleteException(StubTreeLoader.java:193)
	at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:242)
	at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:826)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:127)
	at com.intellij.extapi.psi.ASTDelegatePsiElement.getFirstChild(ASTDelegatePsiElement.java:89)
	at com.intellij.psi.util.PsiTreeUtil.getChildrenOfTypeAsList(PsiTreeUtil.java:413)
	at nl.hannahsten.texifyidea.psi.impl.LatexCommandsImpl.getParameterList(LatexCommandsImpl.java:38)
	at nl.hannahsten.texifyidea.psi.impl.LatexCommandsImplMixin.getRequiredParameters(LatexCommandsImplMixin.kt:128)
	at nl.hannahsten.texifyidea.reference.CommandDefinitionReference.multiResolve(CommandDefinitionReference.kt:38)
	at nl.hannahsten.texifyidea.psi.impl.LatexCommandsImplMixin.getReferences(LatexCommandsImplMixin.kt:108)
	at nl.hannahsten.texifyidea.util.files.PsiFileKt.referencedFiles$lambda$8$lambda$4(PsiFile.kt:122)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:114)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable$lambda$4(InternalReadAction.kt:104)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$3$lambda$2$lambda$1(cancellableReadAction.kt:32)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:351)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:972)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$3$lambda$2(cancellableReadAction.kt:30)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:28)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:103)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:87)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:74)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$6.invokeSuspend(InternalReadAction.kt:53)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@7bead504, Dispatchers.IO]
Caused by: java.lang.AssertionError: Stub count (531) doesn't match stubbed node length (1)
	at com.intellij.psi.impl.source.FileTrees.lambda$reconcilePsi$4(FileTrees.java:188)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:547)
	at com.intellij.psi.impl.source.FileTrees.reconcilePsi(FileTrees.java:176)
	at com.intellij.psi.impl.source.FileTrees.withAst(FileTrees.java:142)
	at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:228)
	... 29 more

@ITModernisation ITModernisation added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Feb 7, 2025
@PHPirates
Copy link
Collaborator

I don't know what happened, but please try File > Invalidate Caches and Restart

@ITModernisation
Copy link
Author

ok

@ITModernisation
Copy link
Author

Invalidate cache done
Memory map attached

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Feb 8, 2025
@PHPirates PHPirates marked this as a duplicate of #3894 Feb 8, 2025
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

No branches or pull requests

2 participants