casteng / i-pascal

A free Object Pascal language plugin for IntelliJ IDEA
112 stars 33 forks source link

ClassCastException #46

Closed Vampire closed 4 years ago

Vampire commented 5 years ago

I just upgrade to latest plugin version (using IJ 2019.2.1) And now I get a bunch of stacktraces, even though I'm not even having any pascal files in the project:

java.lang.ClassCastException: class com.intellij.psi.search.searches.SuperMethodsSearch$SearchParameters cannot be cast to class com.siberika.idea.pascal.lang.search.GotoSuper$OptionsRoutine (com.intellij.psi.search.searches.SuperMethodsSearch$SearchParameters is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @66b2fc7a; com.siberika.idea.pascal.lang.search.GotoSuper$OptionsRoutine is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @70d3b9d1)
    at com.siberika.idea.pascal.lang.search.PascalSuperMethodSearch.processQuery(PascalSuperMethodSearch.java:8)
    at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:77)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:31)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
    at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:114)
    at com.intellij.util.UniqueResultsQuery.processResults(UniqueResultsQuery.java:40)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:83)
    at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:27)
    at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodSignatures(PsiSuperMethodImplUtil.java:78)
    at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodsInternal(PsiSuperMethodImplUtil.java:62)
    at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:56)
    at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:44)
    at com.intellij.psi.impl.source.PsiMethodImpl.findSuperMethods(PsiMethodImpl.java:91)
    at com.intellij.codeInsight.AnnotationUtil.isAnnotated(AnnotationUtil.java:343)
    at com.intellij.codeInsight.AnnotationUtil.isAnnotated(AnnotationUtil.java:293)
    at com.theoryinpractice.testng.util.TestNGUtil.hasTest(TestNGUtil.java:197)
    at com.theoryinpractice.testng.inspection.TestNGEntryPoint.isEntryPoint(TestNGEntryPoint.java:58)
    at com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase.isEntryPoint(UnusedDeclarationInspectionBase.java:347)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.isEntryPoint(RefCountHolder.java:142)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.lambda$$1(RefCountHolder.java:122)
    at com.intellij.util.containers.FactoryMap$1.create(FactoryMap.java:186)
    at com.intellij.util.containers.FactoryMap.get(FactoryMap.java:60)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.shouldCheckUsages(RefCountHolder.java:138)
    at com.intellij.util.containers.ContainerUtil.process(ContainerUtil.java:908)
    at com.intellij.util.containers.JBIterable.processEach(JBIterable.java:219)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.lambda$$1(RefCountHolder.java:131)
    at com.intellij.util.containers.FactoryMap$1.create(FactoryMap.java:186)
    at com.intellij.util.containers.FactoryMap.get(FactoryMap.java:60)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.shouldCheckUsages(RefCountHolder.java:138)
    at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.weAreSureThereAreNoUsages(UnusedSymbolUtil.java:161)
    at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isReallyUsed(UnusedSymbolUtil.java:311)
    at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isClassUsed(UnusedSymbolUtil.java:294)
    at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processClass(PostHighlightingVisitor.java:446)
    at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processIdentifier(PostHighlightingVisitor.java:225)
    at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.collectHighlights(PostHighlightingVisitor.java:146)
    at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$2(HighlightVisitorImpl.java:170)
    at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:366)
    at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:166)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:70)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:281)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
casteng commented 5 years ago

I've fixed this in current version: http://www.siberika.com/downloads/ipascal.zip

stokito commented 5 years ago

@casteng could you update plugin in the IntelliJ marketplace? Also you can create releases with download here on the github repo

casteng commented 5 years ago

Plugin will be updated in the marketplace when it will be ready for next release.

casteng commented 4 years ago

Fixed in v2.50