java.lang.Throwable: AWT events are not allowed inside write action
See original GitHub issueDescribe the bug I keep getting exceptions while using Save Action.
It seems to happen during build or save, but It’s happening irregularly, so I don’t know the exact cause.
java.lang.Throwable: AWT events are not allowed inside write action: java.awt.event.FocusEvent[FOCUS_LOST,temporary,opposite=javax.swing.JEditorPane[,0,0,282x19,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.intellij.util.ui.JBEmptyBorder@59aaa48a,flags=16777504,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],disabledTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],editable=false,margin=com.intellij.util.ui.JBInsets$JBInsetsUIResource[top=3,left=3,bottom=3,right=3],selectedTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],selectionColor=javax.swing.plaf.ColorUIResource[r=75,g=110,b=175],kit=com.intellij.util.ui.JBHtmlEditorKit@3d1e3409,typeHandlers={text/html=javax.swing.text.html.HTMLEditorKit@2cf11a23}],cause=ACTIVATION] on EditorComponent file=file://C:/Users/202030231/IdeaProjects/SigBot/src/main/java/com/signition/sigbot/util/PropertiesUtil.java
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
at com.intellij.openapi.application.impl.NoSwingUnderWriteAction.lambda$watchForEvents$0(NoSwingUnderWriteAction.java:22)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:460)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.SentEvent.dispatch(SentEvent.java:70)
at java.desktop/java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:254)
at java.desktop/java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:281)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:801)
at com.intellij.ide.IdeKeyboardFocusManager.lambda$dispatchEvent$0(IdeKeyboardFocusManager.java:44)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:44)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4910)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/sun.awt.SunToolkit$1.run(SunToolkit.java:511)
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:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
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.pumpEventsForFilter(EventDispatchThread.java:121)
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:702)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:439)
at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1668)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1626)
at com.intellij.ui.messages.AlertMessagesManager.showMessageDialog(AlertMessagesManager.kt:66)
at com.intellij.ui.messages.MessagesServiceImpl.showMessageDialog(MessagesServiceImpl.java:49)
at com.jetbrains.rdserver.ui.BackendMessagesService.showMessageDialog(BackendMessagesService.kt:29)
at com.intellij.openapi.ui.messages.MessagesService$DefaultImpls.showMessageDialog$default(MessagesService.kt:46)
at com.intellij.openapi.ui.MessageDialogBuilder$YesNo.show(MessageDialogBuilder.kt:108)
at com.intellij.openapi.ui.MessageDialogBuilder$YesNo.ask(MessageDialogBuilder.kt:91)
at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$confirmSecondReformat$4(ReformatCodeProcessor.java:162)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:490)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:523)
at com.intellij.codeInsight.actions.ReformatCodeProcessor.confirmSecondReformat(ReformatCodeProcessor.java:150)
at com.intellij.codeInsight.actions.ReformatCodeProcessor.prepareTask(ReformatCodeProcessor.java:127)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.performFileProcessing(AbstractLayoutCodeProcessor.java:450)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$iteration$2(AbstractLayoutCodeProcessor.java:428)
at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:355)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.iteration(AbstractLayoutCodeProcessor.java:428)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$process$8(AbstractLayoutCodeProcessor.java:505)
at com.intellij.codeInsight.actions.FileRecursiveIterator.lambda$processAll$4(FileRecursiveIterator.java:69)
at com.intellij.openapi.roots.impl.FileIndexBase.lambda$toContentIteratorEx$0(FileIndexBase.java:77)
at com.intellij.openapi.roots.impl.FileIndexBase$1.visitFileEx(FileIndexBase.java:60)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:293)
at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:41)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContentUnderDirectory(ProjectFileIndexImpl.java:27)
at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:82)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContentUnderDirectory(ProjectFileIndexImpl.java:27)
at com.intellij.codeInsight.actions.FileRecursiveIterator.processAll(FileRecursiveIterator.java:64)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.process(AbstractLayoutCodeProcessor.java:503)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.processFilesUnderProgress(AbstractLayoutCodeProcessor.java:366)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.lambda$runProcessFiles$1(AbstractLayoutCodeProcessor.java:325)
at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:270)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:526)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
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:176)
at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:459)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:266)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.runProcessFiles(AbstractLayoutCodeProcessor.java:323)
at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.run(AbstractLayoutCodeProcessor.java:222)
at com.dubreuia.processors.SaveWriteCommand.lambda$execute$0(SaveWriteCommand.java:53)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
at com.dubreuia.processors.SaveWriteCommand.execute(SaveWriteCommand.java:53)
at com.dubreuia.core.component.Engine.lambda$processPsiFiles$5(Engine.java:106)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.dubreuia.core.component.Engine.processPsiFiles(Engine.java:107)
at com.dubreuia.core.component.Engine.processPsiFilesIfNecessary(Engine.java:90)
at com.dubreuia.core.component.SaveActionManager.guardedProcessPsiFiles(SaveActionManager.java:169)
at com.dubreuia.core.component.SaveActionManager.lambda$beforeDocumentsSaving$3(SaveActionManager.java:153)
at java.base/java.util.HashMap.forEach(HashMap.java:1337)
at com.dubreuia.core.component.SaveActionManager.beforeDocumentsSaving(SaveActionManager.java:152)
at com.dubreuia.core.component.SaveActionManager.beforeAllDocumentsSaving(SaveActionManager.java:137)
at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:639)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:617)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:417)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:391)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:373)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:34)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:180)
at com.sun.proxy.$Proxy19.beforeAllDocumentsSaving(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:173)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:128)
at com.sun.proxy.$Proxy19.beforeAllDocumentsSaving(Unknown Source)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocuments(FileDocumentManagerImpl.java:274)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:262)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:255)
at com.intellij.execution.runners.DefaultProgramRunnerKt.executeState(DefaultProgramRunner.kt:32)
at com.khmelyuk.multirun.MultirunRunner.lambda$execute$0(MultirunRunner.java:47)
at com.intellij.execution.ExecutionManager$startRunProfile$1.invoke(ExecutionManager.kt:73)
at com.intellij.execution.ExecutionManager$startRunProfile$1.invoke(ExecutionManager.kt:21)
at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:173)
at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:72)
at com.intellij.execution.impl.ExecutionManagerImpl$doStartRunProfile$startRunnable$1.run(ExecutionManagerImpl.kt:234)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
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:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
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)
What triggered the plugin CTRL+S
Versions IntelliJ IDEA 2022.1 (Ultimate Edition) Build #IU-221.5080.210, built on April 12, 2022 Licensed to Subscription is active until May 3, 2023. For educational use only. Runtime version: 11.0.14.1+1-b2043.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Registry: ide.balloon.shadow.size=0 ide.images.show.chessboard=true
Non-Bundled Plugins: org.nik.presentation-assistant (1.0.9) de.santiv.fastscrolling (1.2) com.tabnine.TabNine (0.6.0) com.khmelyuk.multirun (1.13) com.intellij.ideolog (203.0.28.1) com.jetbrains.jax.ws (221.5080.169) com.intellij.guice (221.5080.169) com.euphoricity.gitignore (0.3) com.dubreuia (2.3.0) String Manipulation (9.4.0) mobi.hsz.idea.gitignore (4.4.0) com.almightyalpaca.intellij.plugins.discord (1.9.0) com.haulmont.jpab (2022.2.1-221) com.demonwav.minecraft-dev (2022.1-1.5.19) cn.yiiguxing.plugin.translate (3.3.1-patch.1)
Kotlin: 221-1.6.20-release-285-IJ5080.210
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Similar issue with version 2.3.0 and IntelliJ IDEA 2022.1.2 (Ultimate Edition) Build #IU-221.5787.30, built on May 31, 2022 stackTrace-SaveActions.txt
This is now constantly happening with IntelliJ 2022.3 (Build #IU-223.7571.182). But with a slightly different stack trace.
StackTrace: