AceJump icon indicating copy to clipboard operation
AceJump copied to clipboard

IntelliJ Fatal Error: Attempt to modify read-only document

Open olegkamuz opened this issue 5 years ago • 8 comments

Idea ask me to notice you) Hope its right way) AceJump (3.7.1), IntelliJ IDEA 2021.1 (Community Edition) Build #IC-211.6693.111, built on April 6, 2021 Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Linux 5.3.0-64-generic GC: ParNew, ConcurrentMarkSweep Memory: 1923M Cores: 8 Registry: debugger.watches.in.variables=false, compiler.automake.allow.when.app.running=true Non-Bundled Plugins: AceJump (3.7.1), IdeaVIM (0.66), claims.bold.intellij.avro (0.3.1), org.ressec.idea.plugin.resource-bundle-translator (1.2.2), com.khmelyuk.multirun (1.12), org.intellij.RegexpTester (1.0.8), org.mayevskiy.intellij.sonar (2.9.9), DBN (3.2.3225.0), Docker (211.6693.111), GrepConsole (11.7.211.6085.0), GsonOrXmlFormat (2.0), VisualVMLauncher (1.19.201.000.0), com.aegamesi.java_visualizer.plugin (2.2.0), com.flow.intellij (20200213183746), org.sonarlint.idea (4.15.0.30553), com.thoughtworks.gauge (211.6693.111), in.1ton.idea.spring.assistant.plugin (0.12.0), com.google.gct.core (21.3.1-202) Kotlin: 211-1.4.32-release-IJ6693.72 Current Desktop: ubuntu:GNOME

com.intellij.openapi.editor.ReadOnlyModificationException: Attempt to modify read-only document
	at com.intellij.openapi.editor.impl.DocumentImpl.assertWriteAccess(DocumentImpl.java:697)
	at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:539)
	at com.intellij.openapi.editor.actions.EnterAction.insertNewLineAtCaret(EnterAction.java:59)
	at com.intellij.openapi.editor.actions.EnterAction$Handler.executeWriteAction(EnterAction.java:26)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:66)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:202)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteActionInner(EnterHandler.java:144)
	at com.intellij.codeInsight.editorActions.EnterHandler.lambda$executeWriteAction$0(EnterHandler.java:64)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$2(PostprocessReformattingAspect.java:121)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:129)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:120)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:63)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:66)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:202)
	at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:66)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$2(EditorActionHandler.java:192)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:191)
	at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:312)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:421)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:321)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:296)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:189)
	at org.acejump.action.AceEditorAction.doExecute(AceEditorAction.kt:24)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
	at com.intellij.xdebugger.impl.actions.handlers.XDebuggerSmartStepIntoHandler$SmartStepEditorActionHandler.doExecute(XDebuggerSmartStepIntoHandler.java:417)
	at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:52)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:89)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:207)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:98)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:73)
	at com.maddyhome.idea.vim.KeyHandler.executeAction(KeyHandler.java:150)
	at com.maddyhome.idea.vim.group.ChangeGroup.processEnter(ChangeGroup.java:552)
	at com.maddyhome.idea.vim.action.change.insert.InsertEnterAction.execute(InsertEnterAction.kt:36)
	at com.maddyhome.idea.vim.handler.VimActionHandler.baseExecute(VimActionHandler.kt:55)
	at com.maddyhome.idea.vim.handler.EditorActionHandlerBase.doExecute(EditorActionHandlerBase.kt:94)
	at com.maddyhome.idea.vim.handler.EditorActionHandlerBase.access$doExecute(EditorActionHandlerBase.kt:55)
	at com.maddyhome.idea.vim.handler.EditorActionHandlerBase$execute$action$1.invoke(EditorActionHandlerBase.kt:75)
	at com.maddyhome.idea.vim.handler.EditorActionHandlerBase$execute$action$1.invoke(EditorActionHandlerBase.kt:55)
	at com.maddyhome.idea.vim.handler.EditorActionHandlerBase.execute(EditorActionHandlerBase.kt:79)
	at com.maddyhome.idea.vim.KeyHandler.lambda$executeVimAction$0(KeyHandler.java:113)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:207)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.maddyhome.idea.vim.KeyHandler.executeVimAction(KeyHandler.java:113)
	at com.maddyhome.idea.vim.KeyHandler$ActionRunner.run(KeyHandler.java:936)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.maddyhome.idea.vim.helper.RunnableHelper$runWriteCommand$2.run(RunnableHelper.kt:43)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:148)
	at com.maddyhome.idea.vim.helper.RunnableHelper.runWriteCommand(RunnableHelper.kt:43)
	at com.maddyhome.idea.vim.KeyHandler.executeCommand(KeyHandler.java:698)
	at com.maddyhome.idea.vim.KeyHandler.handleKey(KeyHandler.java:286)
	at com.maddyhome.idea.vim.KeyHandler.handleKey(KeyHandler.java:166)
	at com.maddyhome.idea.vim.action.VimShortcutKeyAction.actionPerformed(VimShortcutKeyAction.kt:71)
	at com.intellij.openapi.actionSystem.EmptyAction$MyDelegatingAction.actionPerformed(EmptyAction.java:102)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAware$5(ActionUtil.java:273)
	at com.intellij.util.SlowOperations.lambda$allowSlowOperations$0(SlowOperations.java:77)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:76)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:273)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:616)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:676)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:675)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:626)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:486)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:481)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:232)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:889)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	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)

olegkamuz avatar Apr 26 '21 20:04 olegkamuz

Were you unable to use AceJump after the error occurred or did you notice any other side effects besides the error message?

breandan avatar Apr 26 '21 20:04 breandan

I can use AceJump, no side effects besides Idea noticing me 3-5 times a day with thith bug report.

olegkamuz avatar Apr 26 '21 21:04 olegkamuz

I've got the same problem! It doesn't have a practical impact, just the error message popping a couple of times a day.

garrafote avatar May 06 '21 11:05 garrafote

AceJump makes the edited file read-only while you're typing the query/tag, but a keyboard shortcut or another plugin can still attempt to modify the file and cause this error. Can you recall if you pressed any shortcuts when the error was reported?

chylex avatar May 07 '21 03:05 chylex

I guess its something with new Idea release - noticing me about similar errors with other plugins on project startup(different projects).

olegkamuz avatar May 07 '21 11:05 olegkamuz

Ok, I can reproduce this error by simply pressing "enter" or "backspace" on insert mode on a read-only file.

Printable characters will cause the IDE to show the "Clear Read-Only Status" window and AceJump will not throw the exception.


AceJump: 3.8.3 Rider for Unreal Engine 2021.1.1 Build #RDCPPP-211.6693.148, built on April 21, 2021 Licensed to Lucas Vasconcelos Subscription is active until August 31, 2021. Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 .NET Framework 4.0.30319.42000 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 48 Registry: debugger.new.debug.tool.window.view=true, ide.tree.horizontal.default.autoscrolling=false, performance.watcher.sampling.interval.ms=200, ide.borderless.tab.caption.in.title=false, ide.tooltip.showAllSeverities=true, show.diff.preview.as.editor.tab=true, light.edit.file.open.enabled=false, performance.watcher.unresponsive.interval.ms=1000, search.everywhere.settings=true, show.diff.preview.as.editor.tab.with.single.click=true, ea.enable.developers.list=false, parameter.info.max.visible.rows=10, ide.win.file.chooser.native=true, vcs.log.show.diff.preview.as.editor.tab=true, search.everywhere.pattern.checking=false, ide.tooltip.initialDelay=0, ide.require.transaction.for.model.changes=false, ide.debug.in.title=true, rdclient.asyncActions=false Non-Bundled Plugins: AceJump (3.8.2), IdeaVIM (0.66), org.jetbrains.IdeaVim-EasyMotion (1.6), io.github.mishkun.ideavimsneak (1.2.0), com.intellij.ideolog (203.0.26.0), com.intellij.resharper.HeapAllocationsViewer (2021.1.0), com.tang (1.3.6.215-IDEA211), com.jetbrains.rider.ezargs (1.0.2)

garrafote avatar May 18 '21 09:05 garrafote

Woops.. my bad, updated last comment as "enter" and "backspace" were interpreted as tags and hidden from the text.

garrafote avatar May 20 '21 08:05 garrafote

Does this error still persist or can we close it?

breandan avatar Dec 23 '21 22:12 breandan