Update failed for AnAction - PyCharm 2021.3

This is happening every time I commit the code since latest release of PyCharm.

Environment:

  • Java: JetBrains s.r.o. 11.0.13
  • OS: Windows 10 amd64
  • IDE: PyCharm 2021.3
  • SonarLint: 6.3.1.40498

update failed for AnAction(com.jetbrains.python.console.actions.ShowCommandQueueAction) with text=Show Command Queue

java.lang.IllegalStateException: @NotNull method com/jetbrains/python/console/actions/CommandQueueForPythonConsoleService.getQueue must not return null
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.$$$reportNull$$$0(CommandQueueForPythonConsoleService.java)
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.getQueue(CommandQueueForPythonConsoleService.java:31)
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.isEmpty(CommandQueueForPythonConsoleService.java:55)
	at com.jetbrains.python.console.actions.ShowCommandQueueAction.update(ShowCommandQueueAction.kt:38)
	at c.ij.oa.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
	at c.ij.oa.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
	at c.ij.oa.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:602)
	at c.ij.oa.actionSystem.impl.ActionUpdater.lambda$updateActionReal$7(ActionUpdater.java:126)
	at c.ij.oa.actionSystem.impl.ActionUpdater.lambda$callAction$8(ActionUpdater.java:191)
	at c.ij.oa.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at c.ij.oa.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at c.ij.oa.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)

Hello, thanks for reporting this issue.

Would you have the full stack trace? I don’t see anything related to SonarLint in the one you reported. Maybe PyCharm attributed the error to the wrong plugin.

Sure, here’s it:

update failed for AnAction(com.jetbrains.python.console.actions.ShowCommandQueueAction) with text=Show Command Queue

java.lang.IllegalStateException: @NotNull method com/jetbrains/python/console/actions/CommandQueueForPythonConsoleService.getQueue must not return null
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.$$$reportNull$$$0(CommandQueueForPythonConsoleService.java)
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.getQueue(CommandQueueForPythonConsoleService.java:31)
	at com.jetbrains.python.console.actions.CommandQueueForPythonConsoleService.isEmpty(CommandQueueForPythonConsoleService.java:55)
	at com.jetbrains.python.console.actions.ShowCommandQueueAction.update(ShowCommandQueueAction.kt:38)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:602)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$7(ActionUpdater.java:126)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$8(ActionUpdater.java:191)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	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:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$9(ActionUpdater.java:189)
	at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
	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:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	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.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:701)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1671)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1629)
	at com.intellij.openapi.ui.messages.AlertMessagesManager.showMessageDialog(AlertMessagesManager.kt:121)
	at com.intellij.ui.messages.MessagesServiceImpl.showMessageDialog(MessagesServiceImpl.java:58)
	at com.jetbrains.rdserver.ui.BackendMessagesService.showMessageDialog(BackendMessagesService.kt:29)
	at com.intellij.openapi.ui.messages.MessagesService$DefaultImpls.showMessageDialog$default(MessagesService.kt:44)
	at com.intellij.openapi.ui.MessageDialogBuilder$YesNo.show(MessageDialogBuilder.kt:120)
	at com.intellij.openapi.ui.MessageDialogBuilder$YesNo.guessWindowAndAsk(MessageDialogBuilder.kt:103)
	at com.intellij.openapi.ui.Messages.showYesNoDialog(Messages.java:463)
	at org.sonarlint.intellij.actions.SonarAnalyzeAllFilesAction.showWarning(SonarAnalyzeAllFilesAction.java:110)
	at org.sonarlint.intellij.actions.SonarAnalyzeAllFilesAction.actionPerformed(SonarAnalyzeAllFilesAction.java:67)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:172)
	at com.intellij.openapi.actionSystem.impl.ActionButton.lambda$performAction$0(ActionButton.java:151)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:151)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:433)
	at java.desktop/java.awt.Component.processEvent(Component.java:6419)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	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:2790)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	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:891)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	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)

Hello @gygabyte017,

Thanks for the complete report. There are indeed mentions of SonarLint at some point in the stack trace but the real error does not happen in our plugin (see com.jetbrains.python). We are discussing this reporting issue with JetBrains as it happens more and more often.

Thanks for reporting!
Damien

1 Like