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. #3362

Closed
DanySK opened this issue Dec 16, 2023 · 1 comment
Closed

java.lang.Throwable: psiElement is not instance of requiredClass. #3362

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

Comments

@DanySK
Copy link

DanySK commented Dec 16, 2023

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

IntelliJ IDEA 2023.3.1 (build IU-233.11799.300)

Operating System

Linux 6.1.67-2-manjaro (amd64)

TeXiFy IDEA version

0.9.2

Description

Stacktrace

java.lang.Throwable: psiElement is not instance of requiredClass.
psiElement={CACHED_SMART_POINTER_KEY=java.lang.ref.SoftReference@553b82e8}, 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=48
 AST INCONSISTENT, perhaps after incremental reparse; LaTeX source file
 stub debugInfo=created in calcStubTree; with backReference
 viewProvider=com.intellij.psi.SingleRootFileViewProvider{vFile=file:///home/danysk/LocalProjects/paper-2023-seams-dynamic-reconfiguration/paper-2023-seams-dynamic-reconfiguration.tex, vFileId=1932202, content=VirtualFileContent{size=98769}, eventSystemEnabled=true}
 viewProvider stamp: 483; file stamp: 483; file modCount: 1702753270894; file length: 98769
 doc saved: true; doc stamp: 483; doc size: 98766; committed: true
indexing info: indexing timestamp = 1702751836410, binary = false, byte size = 98752, char size = 98766
ref: 50cf572587cf
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PsiFileStubImpl}1015386629
   same size=true
   debugInfo=created from index; with backReference
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:151)
	at com.intellij.psi.stubs.StubProcessingHelperBase.checkType(StubProcessingHelperBase.java:85)
	at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:59)
	at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:152)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:201)
	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:894)
	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.IndexUtilBase.getItems$default(IndexUtilBase.kt:118)
	at nl.hannahsten.texifyidea.index.IndexUtilBase.getItemsInFileSet(IndexUtilBase.kt:63)
	at nl.hannahsten.texifyidea.util.files.FileSetKt.commandsInFileSet(FileSet.kt:77)
	at nl.hannahsten.texifyidea.inspections.latex.typesetting.LatexQuoteInspection.inspectFile(LatexQuoteInspection.kt:67)
	at nl.hannahsten.texifyidea.inspections.TexifyInspectionBase.checkFile(TexifyInspectionBase.kt:137)
	at com.intellij.codeInspection.LocalInspectionTool$PsiFileElementVisitor.visitFile(LocalInspectionTool.java:150)
	at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:59)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:336)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:379)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:385)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:158)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:150)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:325)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:129)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:118)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:325)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:307)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:292)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:278)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWork
@DanySK DanySK added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Dec 16, 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 Dec 17, 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