apache / apache/grails-intellij-plugin

Throwable at com.intellij.openapi.application.impl.NoSwingUnderWriteAction.a(NoSwingUnderWriteAction.java:36)

Open
#294 0 comments 0 reactions 0 assignees View on GitHub
bug exception imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

**171.3019.7**
Win7, jdk 1.8.0_111, grails 2.5.5

STR:
Create domain class (as on screenshot attached), use intention "Convert to Class" for "books" => exception:

AWT events are not allowed inside write action: java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.openapi.util.ActionCallback$3@5b2a612b,notifier=null,catchExceptions=false,when=1486571733065] on sun.awt.windows.WToolkit@3205a40c

java.lang.Throwable

```
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.openapi.application.impl.NoSwingUnderWriteAction.a(NoSwingUnderWriteAction.java:36)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:376)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:735)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:457)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1688)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1637)
at org.jetbrains.plugins.groovy.intentions.conversions.ConvertMapToClassIntention.processIntention(ConvertMapToClassIntention.java:87)
at org.jetbrains.plugins.groovy.intentions.base.Intention.invoke(Intention.java:54)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:65)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:196)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:94)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:198)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:186)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:89)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:157)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.b(ShowIntentionActionsHandler.java:185)
at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:184)
at com.intellij.codeInsight.intention.impl.IntentionListStep.c(IntentionListStep.java:273)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:202)
at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1396)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
```

---

*Imported from [IDEA-167900](https://youtrack.jetbrains.com/issue/IDEA-167900) · Type: Exception · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with org.jetbrains.plugins.groovy.intentions.conversions.ConvertMapToClassIntention.java at processIntention, then trace the write-action path around ShowIntentionActionsHandler and NoSwingUnderWriteAction. Reproduce the Convert to Class action on a domain class and verify that it completes without the reported AWT-events-inside-write-action exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.