sourcegraph / jetbrains

Apache License 2.0
80 stars 25 forks source link

bug: java.lang.IllegalStateException: This method is forbidden on EDT because it does not pump the event queue. Switch to a BGT, o... #2700

Open ms-ati opened 2 hours ago

ms-ati commented 2 hours ago

IDE Information

WebStorm 2024.3 Build #WS-243.21565.180, built on November 12, 2024 Licensed to ... Subscription is active until July 31, 2025. Runtime version: 21.0.5+8-b631.16 aarch64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 14.7.1 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 8192M Cores: 10 Metal Rendering is ON Registry: ide.experimental.ui=true i18n.locale= Non-Bundled Plugins: org.toml.lang (243.21565.122) com.intellij.mermaid (0.0.24+IJ.243) org.jetbrains.plugins.gitlab (243.21565.204) org.jetbrains.plugins.github (243.21565.204-ultimate) com.sourcegraph.jetbrains (7.3.2)

Bug Description

I don't know what happened

Additional context

Stacktrace:


java.lang.IllegalStateException: This method is forbidden on EDT because it does not pump the event queue. Switch to a BGT, or use com.intellij.openapi.progress.TasksKt.runWithModalProgressBlocking. 
    at com.intellij.openapi.progress.CoroutinesKt.assertBackgroundThreadOrWriteAction(coroutines.kt:473)
    at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:139)
    at com.intellij.openapi.progress.CoroutinesKt.runBlockingMaybeCancellable(coroutines.kt:176)
    at com.intellij.lang.javascript.service.JSLanguageServiceUtilKt.lockCancellable(JSLanguageServiceUtil.kt:38)
    at com.intellij.lang.javascript.service.JSLanguageServiceQueueImpl.lockCacheCancellable$lambda$19(JSLanguageServiceQueueImpl.kt:338)
    at com.intellij.lang.javascript.service.JSLanguageServiceTracerUtilKt.withTraceSpan(JSLanguageServiceTracerUtil.kt:15)
    at com.intellij.lang.javascript.service.JSLanguageServiceTracerUtilKt.withTraceSpan$default(JSLanguageServiceTracerUtil.kt:13)
    at com.intellij.lang.javascript.service.JSLanguageServiceQueueImpl.lockCacheCancellable(JSLanguageServiceQueueImpl.kt:337)
    at com.intellij.lang.javascript.service.JSLanguageServiceQueueImpl.executeBlocking(JSLanguageServiceQueueImpl.kt:169)
    at com.intellij.lang.javascript.service.JSLanguageServiceQueueImpl.execute(JSLanguageServiceQueueImpl.kt:64)
    at com.intellij.lang.javascript.service.JSLanguageServiceBase.sendCommand(JSLanguageServiceBase.kt:28)
    at com.intellij.lang.javascript.service.JSLanguageServiceFileCommandCache.calculateWithCache(JSLanguageServiceFileCommandCache.kt:51)
    at com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptLanguageServiceFixSet.calcAndUpdateState(TypeScriptLanguageServiceFixSet.java:107)
    at com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptLanguageServiceFixSet.refresh(TypeScriptLanguageServiceFixSet.java:94)
    at com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptLanguageServiceFixSet.lambda$new$1(TypeScriptLanguageServiceFixSet.java:67)
    at com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptLanguageServiceFix.getText(TypeScriptLanguageServiceFix.java:112)
    at com.intellij.lang.typescript.compiler.languageService.codeFixes.TypeScriptLanguageServiceFix.getFamilyName(TypeScriptLanguageServiceFix.java:123)
    at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doApplyInformationToEditor$lambda$4(CodyFixHighlightPass.kt:118)
    at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doApplyInformationToEditor$lambda$5(CodyFixHighlightPass.kt:118)
    at com.intellij.codeInsight.daemon.impl.HighlightInfo.lambda$unregisterQuickFix$2(HighlightInfo.java:1012)
    at com.intellij.util.containers.ContainerUtil.findAll(ContainerUtil.java:1031)
    at com.intellij.util.containers.ContainerUtil.filter(ContainerUtil.java:1006)
    at com.intellij.codeInsight.daemon.impl.HighlightInfo.unregisterQuickFix(HighlightInfo.java:1012)
    at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doApplyInformationToEditor(CodyFixHighlightPass.kt:118)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.applyInformationToEditor(TextEditorHighlightingPass.java:116)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService.lambda$applyInformationToEditorsLater$2(PassExecutorService.java:512)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
    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:675)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAc...
linear[bot] commented 2 hours ago

BUGS-788 bug: java.lang.IllegalStateException: This method is forbidden on EDT because it does not pump the event queue. Switch to a BGT, o...