intellij-plugin-save-actions: IntelliJ complains that "Refactorings should not be started inside write action"

Describe the bug I got this exception in the logs today, dunno when/what triggered it. I guess they added new checks with the recent update.

Refactorings should not be started inside write action
 because they start progress inside and any read action from the progress task would cause the deadlock

java.lang.Exception
	at com.intellij.refactoring.BaseRefactoringProcessor.run(BaseRefactoringProcessor.java:560)
	at com.siyeh.ig.performance.MethodMayBeStaticInspection$1.doFix(MethodMayBeStaticInspection.java:40)
	at com.siyeh.ig.InspectionGadgetsFix.applyFix(InspectionGadgetsFix.java:39)
	at com.siyeh.ig.InspectionGadgetsFix.applyFix(InspectionGadgetsFix.java:26)
	at com.dubreuia.processors.java.InspectionProcessor$InspectionWriteQuickFixesAction.writeQuickFixes(InspectionProcessor.java:94)
	at com.dubreuia.processors.java.InspectionProcessor$InspectionWriteQuickFixesAction.run(InspectionProcessor.java:83)
	at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:349)
	at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
	at com.intellij.openapi.command.WriteCommandAction.lambda$null$1(WriteCommandAction.java:265)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1038)
	at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:264)
	at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$4(WriteCommandAction.java:322)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:139)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:107)
	at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:324)
	at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:262)
	at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:244)
	at com.dubreuia.processors.java.InspectionProcessor.lambda$run$0(InspectionProcessor.java:49)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:447)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:431)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
	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.defaultDispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:722)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	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)

To Reproduce Use the plugin… Seriously, I don’t know what triggered this.

Versions IntelliJ IDEA 2018.2.6 (Ultimate Edition) Build #IU-182.5107.16, built on November 6, 2018 JRE: 1.8.0_152-release-1380-b3 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.19.1-arch1-1-ARCH

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 1
  • Comments: 21 (11 by maintainers)

Most upvoted comments

Ok thanks, I think I know what’s going on, I’ll need to find some time to fix it

@dubreuia Don’t worry, I took it from the github releases.