sourcegraph / jetbrains

Apache License 2.0
70 stars 23 forks source link

JetBrains: Crash occurred while running Edit Code command from command window after relaunching IDE #2133

Open RajatNagoria opened 2 months ago

RajatNagoria commented 2 months ago

IDE Information

IntelliJ IDEA 2024.2 (Community Edition) Build #IC-242.20224.300, built on August 7, 2024 Runtime version: 21.0.3+13-b509.4 aarch64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit windows 11 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Registry: ide.experimental.ui=true Non-Bundled Plugins: DevKit (242.20224.159) PythonCore (242.20224.300) idea.plugin.protoeditor (242.20224.155) gherkin (242.20224.159) com.jetbrains.space (242.20224.155) cucumber-java (242.20224.159) com.sourcegraph.jetbrains (6.0.32-nightly) Kotlin: 242.20224.300-IJ

Bug Description

Platform: Windows

Steps to reproduce:

  1. Have Cody plugin installed in your JB IntelliJ editor
  2. Login to Cody with Free/Pro user
  3. Make sure there is code available in source code file
  4. Relaunch the editor > Try to run Edit code command from command window

Observed behavior:

Crash occurred while running Edit Code command from command window after relaunching IDE

Expected behavior:

Crash should not occur

Stacktrace:

com.intellij.diagnostic.PluginException: Unknown data context kind 'com.sourcegraph.cody.ui.WebUIHostImpl$$Lambda/0x0000000101d9c270'. Use DataManager.getDataContext, CustomizedDataContext, or SimpleDataContext [Plugin: com.sourcegraph.jetbrains]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
    at com.intellij.openapi.actionSystem.impl.Utils.reportUnexpectedDataContextKind(Utils.kt:191)
    at com.intellij.openapi.actionSystem.impl.Utils.createAsyncDataContextImpl(Utils.kt:185)
    at com.intellij.openapi.actionSystem.impl.Utils.createAsyncDataContext(Utils.kt:164)
    at com.intellij.openapi.fileEditor.impl.IdeUiServiceImpl.createCustomizedDataContext(IdeUiServiceImpl.java:89)
    at com.intellij.ide.impl.DataManagerImpl.customizeDataContext(DataManagerImpl.java:192)
    at com.intellij.openapi.actionSystem.CustomizedDataContext.withSnapshot(CustomizedDataContext.java:115)
    at com.intellij.openapi.editor.actionSystem.EditorAction.getProjectAwareDataContext(EditorAction.java:184)
    at com.intellij.openapi.editor.actionSystem.EditorAction.executeHandler(EditorAction.java:120)
    at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:107)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:226)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:106)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:83)
    at com.sourcegraph.cody.ui.WebUIHostImpl.postMessageWebviewToHost$lambda$2(CodyToolWindowFactory.kt:302)
    at com.intellij.openapi.application.ActionsKt.invokeLater$lambda$5(actions.kt:66)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:836)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:425)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    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)

Additional context

Video link: https://drive.google.com/file/d/1WA_bEbGMuSDu6wyq1DP6wATJ3aYMLI4e/view

taylorsperry commented 2 months ago

Created Linear issue https://linear.app/sourcegraph/issue/CODY-3532/jetbrains-crash-occurred-while-running-edit-code-command-from-command