-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
comp-ideIssue is related to IDE supportIssue is related to IDE supportctg-bugIssue is a bugIssue is a buglang-pythonIssue is related to python supportIssue is related to python support
Description
Description
GenerateTestsAction#update@ProjectViewPopup thrown NoClassDefFoundError from PythonLanguageAssistant.getPsiTargets
in IDEA - just after Python plugin is installed - without restart.
To Reproduce
- Run the 'utbot' project in IntelliJ Idea 2022.2.4 Ultimate
- Python plugin is NOT installed
- Install the latest UTBotJava builds from main
- Set
Experimental languages support
to true (File -> Settings -> Tools -> UnitTestBot) - Open Plugins, install Python plugin, click Ok
- Do NOT restart IDE
- In Project view right-click on
utbot-python/samples/easy_samples/annotations2.py
Expected behavior
Generate Tests with UnitTestBot...
action should be present in context menu.
No exception is expected to be thrown.
Actual behavior
Generate Tests with UnitTestBot...
action is absent.
NoClassDefFoundError is thrown in IDE (see details below)
Visual proofs (screenshots, logs, images)
GenerateTestsAction#update@ProjectViewPopup (org.utbot.intellij.plugin.ui.actions.GenerateTestsAction), actionId=org.utbot.intellij.plugin.ui.actions.GenerateTestsAction, text='Generate Tests with UnitTestBot...'
java.lang.NoClassDefFoundError: com/jetbrains/python/psi/PyFile
at org.utbot.intellij.plugin.language.python.PythonLanguageAssistant.getPsiTargets(PythonLanguageAssistant.kt:51)
at org.utbot.intellij.plugin.language.python.PythonLanguageAssistant.update(PythonLanguageAssistant.kt:46)
at org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.update(GenerateTestsAction.kt:19)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:150)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:173)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:660)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:128)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$6(ActionUpdater.java:211)
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.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:207)
at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupImpl$3(Utils.java:235)
at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:778)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.java:233)
at com.intellij.openapi.actionSystem.impl.Utils.lambda$fillMenu$6(Utils.java:317)
at com.intellij.openapi.actionSystem.impl.Utils.computeWithRetries(Utils.java:808)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:316)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.lambda$updateChildren$2(ActionPopupMenuImpl.java:172)
at com.intellij.util.TimeoutUtil.run(TimeoutUtil.java:59)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.updateChildren(ActionPopupMenuImpl.java:171)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:123)
at com.intellij.ui.PopupHandler$2.invokePopup(PopupHandler.java:142)
at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:55)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:422)
at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:44)
at java.desktop/java.awt.Component.processEvent(Component.java:6413)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.ClassNotFoundException: com.jetbrains.python.psi.PyFile PluginClassLoader(plugin=PluginDescriptor(name=UnitTestBot, id=org.utbot.intellij.plugin.id, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\utbot-intellij, version=2023.2.764., package=null, isBundled=false), packagePrefix=null, instanceId=369, state=active)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:214)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 99 more
Environment
Windows 10 Pro
IntelliJ IDEA Ultimate 2022.2.4
Additional context
Reproducing after Python plugin is installed without IDE restart.
Doesn't reproduce after IDE was restarted.
Metadata
Metadata
Assignees
Labels
comp-ideIssue is related to IDE supportIssue is related to IDE supportctg-bugIssue is a bugIssue is a buglang-pythonIssue is related to python supportIssue is related to python support
Type
Projects
Status
Todo