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.Throwable: psiElement is not instance of requiredClass. #3301

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

Comments

@d-akselrod
Copy link

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

JetBrains Rider 2023.2.2 (build RD-232.9921.83)

Operating System

Mac OS X 14.0 (aarch64)

TeXiFy IDEA version

0.9.1

Description

Stacktrace

java.lang.Throwable: psiElement is not instance of requiredClass.
psiElement={INJECTED_PSI=com.intellij.psi.impl.source.tree.injected.InjectionResult@21c8b774, com.intellij.model.psi.impl.PsiSymbolReferenceServiceImpl$$Lambda$6595/0x000000f002bc6908=PsiCachedValueImpl{com.intellij.model.psi.impl.PsiSymbolReferenceServiceImpl$$Lambda$6595/0x000000f002bc6908@73184736}, org.intellij.plugins.intelliLang.references.InjectedReferencesContributor$$Lambda$6622/0x000000f002ae3708=PsiCachedValueImpl{org.intellij.plugins.intelliLang.references.InjectedReferencesContributor$$Lambda$6622/0x000000f002ae3708@3b619be1}}, psiElement.class=class nl.hannahsten.texifyidea.psi.impl.LatexEnvironmentImpl, requiredClass=interface nl.hannahsten.texifyidea.psi.LatexCommands.
ref: 50cf572587cf
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=5
 AST INCONSISTENT, perhaps after incremental reparse; LaTeX source file
 stub debugInfo=created in calcStubTree; with backReference
 viewProvider=com.intellij.psi.SingleRootFileViewProvider{vFile=file:///Users/daniel/Documents/Local Repositories/SweatSmart/docs/VnVPlan/VnVPlan.tex, vFileId=120410, content=VirtualFileContent{size=14710}, eventSystemEnabled=true}
 viewProvider stamp: 1463; file stamp: 0; file modCount: 1696027523930; file length: 14710
 doc saved: false; doc stamp: 1463; doc size: 11571; committed: true
indexing info: indexing timestamp = 1696027523930, binary = false, byte size = 14710, char size = 14710
ref: 50cf572587cf
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PsiFileStubImpl}1344157719
   same size=true
   debugInfo=created from index; with backReference
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
	at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:164)
	at com.intellij.psi.stubs.StubProcessingHelperBase.checkType(StubProcessingHelperBase.java:99)
	at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:72)
	at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:150)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:214)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:102)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:90)
	at nl.hannahsten.texifyidea.index.IndexUtilBase$getItemsByName$1.invoke(IndexUtilBase.kt:140)
	at nl.hannahsten.texifyidea.index.IndexUtilBase$getItemsByName$1.invoke(IndexUtilBase.kt:140)
	at com.intellij.openapi.application.ActionsKt.runReadAction$lambda$3(actions.kt:31)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
	at com.intellij.openapi.application.ActionsKt.runReadAction(actions.kt:31)
	at nl.hannahsten.texifyidea.index.IndexUtilBase.getItemsByName(IndexUtilBase.kt:140)
	at nl.hannahsten.texifyidea.index.IndexUtilBase.getItems(IndexUtilBase.kt:122)
	at nl.hannahsten.texifyidea.index.IndexCommandsUtilBase.getCommandsByNames(IndexCommandsUtilBase.kt:21)
	at nl.hannahsten.texifyidea.index.IndexCommandsUtilBase.getCommandsByNames(IndexCommandsUtilBase.kt:44)
	at nl.hannahsten.texifyidea.inspections.latex.typesetting.LatexIncorrectSectionNestingInspection.inspectFile(LatexIncorrectSectionNestingInspection.kt:40)
	at nl.hannahsten.texifyidea.inspections.TexifyInspectionBase.checkFile(TexifyInspectionBase.kt:137)
	at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:138)
	at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:59)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:334)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:342)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:201)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:207)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:348)
	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:311)
	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:311)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:314)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:299)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:285)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
	
@d-akselrod d-akselrod added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Nov 5, 2023
@PHPirates
Copy link
Collaborator

Thanks for reporting! Duplicate of #3291

@PHPirates PHPirates added duplicate Another issue exists addressing the same problem. and removed untriaged Issue type still needs to be triaged or verified. labels Nov 8, 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