Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Exception: Write-unsafe context! Model changes are allowed from write-safe contexts only #206

Open
serverhorror opened this issue Sep 16, 2019 · 0 comments

Comments

@serverhorror
Copy link

This might be the same as #195 but I'm not sure.

Unfortunately I can't reproduce this now, it happened while clicking thru either of:

  • R Packages or
  • R Graphics
java.lang.Throwable: Write-unsafe context! Model changes are 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, writingAllowed=true;
    ModalityState:{[com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog[dialog0,736,480,448x200,invalid,hidden,layout=java.awt.BorderLayout,APPLICATION_MODAL,title=Update Project,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=,rootPaneCheckingEnabled=true]]}, writingAllowed=true;
    ModalityState:{}, writingAllowed=true
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
	at com.intellij.openapi.application.TransactionGuardImpl.assertWriteActionAllowed(TransactionGuardImpl.java:229)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.fireEvent(PsiModificationTrackerImpl.java:69)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.incCountersInner(PsiModificationTrackerImpl.java:75)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.treeChanged(PsiModificationTrackerImpl.java:85)
	at com.intellij.psi.impl.PsiManagerImpl.fireEvent(PsiManagerImpl.java:344)
	at com.intellij.psi.impl.PsiManagerImpl.beforeChildAddition(PsiManagerImpl.java:208)
	at com.intellij.psi.impl.file.impl.PsiVFSListener.lambda$fileCreated$1(PsiVFSListener.java:133)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:994)
	at com.intellij.psi.impl.file.impl.PsiVFSListener.fileCreated(PsiVFSListener.java:120)
	at com.intellij.psi.impl.file.impl.PsiVFSListener.fireForGrouped(PsiVFSListener.java:698)
	at one.util.streamex.CollapseSpliterator.accept(CollapseSpliterator.java:150)
	at one.util.streamex.CollapseSpliterator.forEachRemaining(CollapseSpliterator.java:140)
	at one.util.streamex.AbstractStreamEx.forEach(AbstractStreamEx.java:306)
	at com.intellij.psi.impl.file.impl.PsiVFSListener.groupAndFire(PsiVFSListener.java:675)
	at com.intellij.psi.impl.file.impl.PsiVFSListener.after(PsiVFSListener.java:664)
	at com.intellij.psi.impl.file.impl.PsiVFSListener$2.after(PsiVFSListener.java:108)
	at jdk.internal.reflect.GeneratedMethodAccessor96.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.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:102)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:446)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:406)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:395)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:242)
	at com.sun.proxy.$Proxy21.after(Unknown Source)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvent(PersistentFSImpl.java:694)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.createChildDirectory(PersistentFSImpl.java:436)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.createChildDirectory(VirtualFileSystemEntry.java:283)
	at com.r4intellij.run.graphics.RGraphicsUtils$2.run(RGraphicsUtils.java:222)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:994)
	at com.r4intellij.run.graphics.RGraphicsUtils.createSnapshotDir(RGraphicsUtils.java:216)
	at com.r4intellij.run.graphics.RGraphicsUtils.getSnapshotDir(RGraphicsUtils.java:187)
	at com.r4intellij.run.graphics.RGraphicsUtils.getSnapshotDir(RGraphicsUtils.java:159)
	at com.r4intellij.run.graphics.RGraphicsUtils.getGraphicsState(RGraphicsUtils.java:88)
	at com.r4intellij.run.graphics.RGraphicsToolWindowFactory.createToolWindowContent(RGraphicsToolWindowFactory.java:17)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.ensureContentInitialized(ToolWindowImpl.java:533)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.java:356)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel.contentManager(ContentTabLabel.java:356)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel.isSelected(ContentTabLabel.java:339)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel._getGraphics(ContentTabLabel.java:348)
	at com.intellij.openapi.wm.impl.content.BaseLabel.paintComponent(BaseLabel.java:78)
	at com.intellij.openapi.wm.impl.content.ContentTabLabel.paintComponent(ContentTabLabel.java:334)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at com.intellij.openapi.wm.impl.content.ToolWindowContentUi.paintChildren(ToolWindowContentUi.java:257)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at com.intellij.openapi.wm.impl.ToolWindowHeader.paintChildren(ToolWindowHeader.java:345)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1654)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1629)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1566)
	at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1333)
	at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
	at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:868)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:851)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:851)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:826)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:775)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1901)
	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:878)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant