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.

IntelliJ complains that "Refactorings should not be started inside write action"

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
dubreuiacommented, Feb 26, 2019

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

1reaction
Vrakfallcommented, Jan 18, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable and suppress inspections | IntelliJ IDEA Documentation
Some inspections may report problems that you currently do not want to see. In this case, you can disable or suppress them.
Read more >
Serious BUGS in Intellij... since at least 7.04
Serious Bug Nbr 1: Refactoring: Sometimes when you rename a variable in a document, Intellij will go ahead and rename everything it finds...
Read more >
Code refactoring | IntelliJ IDEA Documentation - JetBrains
Refactoring is a process of improving your source code without creating a new functionality. Refactoring helps you keep your code solid ...
Read more >
Intellij IDEA cannot resolve any import statement
In my main work project I do not have any problem with resolving Java classes. However I wanted to write some simple program, ......
Read more >
Refactorings in GoLand: Change Signature - The JetBrains Blog
Today, we're going to start a series of blog posts about an essential part of the development life cycle that happens for any...
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