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

Closed
amoscalamida 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

@amoscalamida
Copy link

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

PyCharm 2023.2.3 (build PY-232.10072.31)

Operating System

Mac OS X 13.6 (aarch64)

TeXiFy IDEA version

0.9.1

Description

Stacktrace

java.lang.Throwable: psiElement is not instance of requiredClass.
psiElement={}, 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=1
 tree consistent
 stub debugInfo=created in calcStubTree; with backReference
 viewProvider=com.intellij.psi.SingleRootFileViewProvider{vFile=file:///Users/amos.calamida/fleet/6534cf0501190f831e072d25/main.tex, vFileId=26873, content=VirtualFileContent{size=34710}, eventSystemEnabled=true}
 viewProvider stamp: 453242; file stamp: 450702; file modCount: 1699210380096; file length: 34710
 doc saved: false; doc stamp: 453242; doc size: 34878; committed: true
indexing info: indexing timestamp = 1699210380096, binary = false, byte size = 34710, char size = 34878
ref: 50cf572587cf
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PsiFileStubImpl}815049657
   same size=false
   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.util.files.ImportPackageKt.searchFileByImportPaths(ImportPackage.kt:24)
	at nl.hannahsten.texifyidea.reference.InputFileReference.resolve(InputFileReference.kt:210)
	at nl.hannahsten.texifyidea.reference.InputFileReference.resolve$default(InputFileReference.kt:113)
	at nl.hannahsten.texifyidea.reference.InputFileReference.resolve(InputFileReference.kt:94)
	at nl.hannahsten.texifyidea.gutter.LatexNavigationGutter.collectNavigationMarkers(LatexNavigationGutter.kt:55)
	at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectNavigationMarkers(RelatedItemLineMarkerProvider.java:35)
	at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectSlowLineMarkers(RelatedItemLineMarkerProvider.java:27)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:225)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectMarkers$2(LineMarkersPass.java:113)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:95)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectMarkers(LineMarkersPass.java:103)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:76)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:390)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:77)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:24)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:386)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:377)
	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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:376)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:352)
	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.PassExecutorService$ScheduledPass.run(PassExecutorService.java:350)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:190)
	at java.base/java.util.concurrent
@amoscalamida amoscalamida 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