question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write access is allowed from write-safe contexts only

See original GitHub issue

Latest IntelliJ IDEA 2016.3 Build #IU-163.7743.37 shows an error due to Lombok plugin:

Write access is allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any"). See TransactionGuard documentation for details.
  current modality=ModalityState.NON_MODAL
  known modalities={ModalityState.NON_MODAL=true}
java.lang.Throwable
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
	at com.intellij.openapi.application.TransactionGuardImpl.assertWriteActionAllowed(TransactionGuardImpl.java:246)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitAllDocuments(PsiDocumentManagerBase.java:219)
	at de.plushnikov.intellij.plugin.action.delombok.BaseDelombokAction.isValidForFile(BaseDelombokAction.java:205)
	at de.plushnikov.intellij.plugin.action.delombok.BaseDelombokAction.update(BaseDelombokAction.java:135)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:122)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:188)
	at com.intellij.openapi.actionSystem.impl.Utils.updateGroupChild(Utils.java:265)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:239)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:205)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:153)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:86)
	at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:280)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.c(ActionMenu.java:324)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.access$600(ActionMenu.java:51)
	at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:278)
	at javax.swing.JMenu.fireMenuSelected(JMenu.java:1038)
	at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1118)
	at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:349)
	at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:232)
	at javax.swing.JMenu.setSelected(JMenu.java:305)
	at com.apple.laf.ScreenMenu$2.run(ScreenMenu.java:135)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at com.intellij.ide.IdeEventQueue.g(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:679)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
	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)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonjoneskicommented, Nov 23, 2016

I have a Java only project, and am getting the same exception on startup of the IDE.

0reactions
alexejkcommented, Dec 11, 2016

You can install it manually by downloading from the Releases page and then “Install plugin from file” in IntelliJ. You will still be able to get new plugin updates when they are released automatically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IDE Fatal Error: Write access is allowed from write-safe ...
When application starts, IDE error occur: Write access is allowed from write-safe contexts only. Please ensure you're using invokeLater/ ...
Read more >
"Write access is allowed from write-safe contexts only" when quickly ...
Write access is allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any").
Read more >
Write access is allowed from write-safe contexts only. · Issue #317 ...
I get an error message once in a while after starting IntelliJ Idea Ultimate IDE (Version 2016.3) with some java source files opened:...
Read more >
Write-unsafe context! Model changes are allowed from write ...
Write -unsafe context! Model changes are allowed from write-safe contexts only. 1. Is duplicated by 1. Is duplicated by 1 issue (0 unresolved)....
Read more >
Write safe and efficient C# code | Microsoft Learn
Some of the guidance in this article refers to coding practices that are always advisable, not only for the performance benefit. Use the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found