ReallyLiri / interface-pairing-rider-plugin

JetBrains Rider plugin to improve interface viewing in solution explorer
MIT License
3 stars 0 forks source link

Exception: java.lang.IncompatibleClassChangeError: Found interface com.jetbrains.rider.projectView.workspace.ProjectModelEntity, but class was expected #2

Open Sveild opened 2 years ago

Sveild commented 2 years ago

Hello,

When launching rider with your plugin, I get that exception:

java.lang.IncompatibleClassChangeError: Found interface com.jetbrains.rider.projectView.workspace.ProjectModelEntity, but class was expected
    at com.reallyliri.plugins.interfacepairing.InterfacePairingSolutionExplorerCustomization.setInterfacePairingSortKeys(InterfacePairingSolutionExplorerCustomization.java:38)
    at com.reallyliri.plugins.interfacepairing.InterfacePairingSolutionExplorerCustomization.getChildren(InterfacePairingSolutionExplorerCustomization.java:32)
    at com.jetbrains.rider.projectView.views.solutionExplorer.nodes.SolutionExplorerModelNode.calculateChildren(SolutionExplorerModelNode.kt:83)
    at com.jetbrains.rider.projectView.views.SolutionViewNode.getChildren(SolutionViewNode.kt:30)
    at com.jetbrains.rider.projectView.views.impl.SolutionViewTreeModel.getChildren(SolutionViewTreeModel.kt:35)
    at com.intellij.ui.tree.BaseTreeModel.getChildCount(BaseTreeModel.java:17)
    at com.intellij.ui.tree.BaseTreeModel.isLeaf(BaseTreeModel.java:12)
    at com.intellij.ui.tree.LeafState.get(LeafState.java:64)
    at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:574)
    at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:547)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406)
    at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:319)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
    at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:205)
    at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:183)
    at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:487)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)

If you're not maintaining this anymore, I'm willing to try to fix it and do a PR if needed. 😃

ReallyLiri commented 2 years ago

Thanks for reporting! Am still here, although I'm not using Rider for my development these days. Which version of Rider did you experience this in? I'll have time to take a look next week :)

Sveild commented 2 years ago

I'm using Rider 2022.2.3

ReallyLiri commented 2 years ago

Update: seems to be due to intellij sdk moving to java 17 starting Rider 2022. Working on upgrades

ReallyLiri commented 2 years ago

new version 1.4.3 is out with the compatibility fix, please try it :) https://plugins.jetbrains.com/plugin/13185-interface-pairing/versions

Sveild commented 2 years ago

I can see your update on the website, but when trying to update from Rider it only shows version 1.4.2.

ReallyLiri commented 2 years ago

that's weird, can you try to install from jetbrains site?

Sveild commented 2 years ago

Capture Capture1

ReallyLiri commented 2 years ago

funny, never saw this RD- prefix :) I'll consult jetbrains to see how this version conflict should be handled.

ReallyLiri commented 2 years ago

managed to fix compatibility issue, but bug still reproduces on 2022.2, so guess it was never resolved in the first place. Although it doesn't reproduce in debugger, only in live instance. Looking into it again.

2022-10-25 19:07:16,484 [ 991430] SEVERE - #c.i.u.c.Invoker - Found interface com.jetbrains.rider.projectView.workspace.ProjectModelEntity, but class was expected
java.lang.IncompatibleClassChangeError: Found interface com.jetbrains.rider.projectView.workspace.ProjectModelEntity, but class was expected
    at com.reallyliri.plugins.interfacepairing.InterfacePairingSolutionExplorerCustomization.setInterfacePairingSortKeys(InterfacePairingSolutionExplorerCustomization.java:38)
    at com.reallyliri.plugins.interfacepairing.InterfacePairingSolutionExplorerCustomization.getChildren(InterfacePairingSolutionExplorerCustomization.java:32)
    at com.jetbrains.rider.projectView.views.solutionExplorer.nodes.SolutionExplorerModelNode.calculateChildren(SolutionExplorerModelNode.kt:83)