BasLeijdekkers / MetricsReloaded

Automated source code metrics plugin for IntelliJ IDEA
http://plugins.intellij.net/plugin/?id=93
165 stars 31 forks source link

no instance found for RelativeLinesOfCode while trying to analyze my project #69

Closed fjanisze closed 3 years ago

fjanisze commented 3 years ago

I get the error described in the log below while trying to analyze my project, I'm running:

CLion 2020.3.1
Build #CL-203.6682.181, built on December 30, 2020
Licensed to Filip Janiszewski
You have a perpetual fallback license for this version.
Subscription is active until February 14, 2022.
Runtime version: 11.0.9.1+11-b1145.63 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 4.18.0-193.6.3.el8_2.x86_64
GC: ParNew, ConcurrentMarkSweep
Memory: 16371M
Cores: 20
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: name.kropp.intellij.makefile, MetricsReloaded
Current Desktop: GNOME

Any help would be appreciated, thanks.

java.lang.AssertionError: no instance found for RelativeLinesOfCode
    at com.sixrr.metrics.profile.MetricsProfileRepository.addPrebuiltProfile(MetricsProfileRepository.java:157)
    at com.sixrr.metrics.profile.MetricsProfileRepository.addPrebuiltProfiles(MetricsProfileRepository.java:138)
    at com.sixrr.metrics.profile.MetricsProfileRepository.initialize(MetricsProfileRepository.java:95)
    at com.sixrr.metrics.profile.MetricsProfileRepository.<init>(MetricsProfileRepository.java:56)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:733)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:457)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:440)
    at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:21)
    at com.sixrr.metrics.profile.MetricsProfileRepository.getInstance(MetricsProfileRepository.java:60)
    at com.sixrr.metrics.ui.dialogs.ProfileSelectionPanel.<init>(ProfileSelectionPanel.java:39)
    at com.sixrr.metrics.plugin.ProjectMetricsAction.getAdditionalActionSettings(ProjectMetricsAction.java:76)
    at com.intellij.analysis.BaseAnalysisAction$1.getAdditionalActionSettings(BaseAnalysisAction.java:68)
    at com.intellij.analysis.BaseAnalysisActionDialog.createCenterPanel(BaseAnalysisActionDialog.java:171)
    at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1331)
    at com.intellij.analysis.BaseAnalysisActionDialog.<init>(BaseAnalysisActionDialog.java:98)
    at com.intellij.analysis.BaseAnalysisActionDialog.<init>(BaseAnalysisActionDialog.java:79)
    at com.intellij.analysis.BaseAnalysisAction$1.<init>(BaseAnalysisAction.java:60)
    at com.intellij.analysis.BaseAnalysisAction.actionPerformed(BaseAnalysisAction.java:60)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:281)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:310)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:286)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:77)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:299)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:110)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:514)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:544)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
    at java.desktop/java.awt.Component.processEvent(Component.java:6417)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:911)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:840)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
ebadia commented 3 years ago

Same here

java.lang.AssertionError: no instance found for RelativeLinesOfCode at com.sixrr.metrics.profile.MetricsProfileRepository.addPrebuiltProfile(MetricsProfileRepository.java:157) at com.sixrr.metrics.profile.MetricsProfileRepository.addPrebuiltProfiles(MetricsProfileRepository.java:138) at com.sixrr.metrics.profile.MetricsProfileRepository.initialize(MetricsProfileRepository.java:95) at com.sixrr.metrics.profile.MetricsProfileRepository.<init>(MetricsProfileRepository.java:56) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47) at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:733) at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49) at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37) at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:457) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:440) at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:21) at com.sixrr.metrics.profile.MetricsProfileRepository.getInstance(MetricsProfileRepository.java:60) at com.sixrr.metrics.ui.dialogs.ProfileSelectionPanel.<init>(ProfileSelectionPanel.java:39) at com.sixrr.metrics.plugin.ProjectMetricsAction.getAdditionalActionSettings(ProjectMetricsAction.java:76) at com.intellij.analysis.BaseAnalysisAction$1.getAdditionalActionSettings(BaseAnalysisAction.java:68) at com.intellij.analysis.BaseAnalysisActionDialog.createCenterPanel(BaseAnalysisActionDialog.java:171) at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1331) at com.intellij.analysis.BaseAnalysisActionDialog.<init>(BaseAnalysisActionDialog.java:98) at com.intellij.analysis.BaseAnalysisActionDialog.<init>(BaseAnalysisActionDialog.java:79) at com.intellij.analysis.BaseAnalysisAction$1.<init>(BaseAnalysisAction.java:60) at com.intellij.analysis.BaseAnalysisAction.actionPerformed(BaseAnalysisAction.java:60) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:281) at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:104) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

BasLeijdekkers commented 3 years ago

Thanks for the report. I believe this problem only occurs when using an IDE which does not support Java (e.g. CLion). I will release an update with a fix soon. Sorry for your trouble.

BasLeijdekkers commented 3 years ago

A bug fix update is available now.

ebadia commented 3 years ago

working great now with WebStorm. Thanks!!!