[ 
https://issues.apache.org/jira/browse/GROOVY-7570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024899#comment-15024899
 ] 

Pascal Schumacher commented on GROOVY-7570:
-------------------------------------------

Created [https://github.com/groovy/groovy-eclipse/issues/155] for this.

> Eclipse: Upon save of editor: "Save Failed" "assertion failed:"
> ---------------------------------------------------------------
>
>                 Key: GROOVY-7570
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7570
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Endre Stølsvik
>         Attachments: After it has happened - notice still modified 
> asterix.png, Error Log - Event Details - Session Data.png, Save All Failed - 
> assertion failed.png, Trying to close failed editor makes the Save Resource 
> dialog appear.png, Whacky colorization state before Save Failed occurs.png
>
>
> Way too often when I have changed some code in a file, and then hit Ctrl+S, a 
> small popup comes up, titled "Problem Occurred", stating two lines of text: 
> "Save Failed" "assertion failed:", with two buttons "OK" and "Details >>". 
> Clicking Details does not help, it just repeats the four words of text.
> You then have to say "OK", and the contents of the file window disappears, 
> being replaced by a single blue line with the text "Error" below. You do not 
> have any way whatsoever to recover your changes.
> When you finally accept your fate once again, and try to close the window, 
> the normal "Save Resource - file has been modified, save changes?"-popup 
> comes up. But the "Save"-button just pops the error popup up again (However, 
> it now says "Save All Failed" instead of just "Save Failed"). So the only 
> thing you can do, is to hit "No".
> You are left with having to Ctrl+S all the time, as if you were writing in 
> some old version of Word - constantly being terrified of your work being 
> destroyed at any time, of course not keeping a complete "changelog" in your 
> head, so you are always left a bit in the dark when it finally happens again.
> There is no stable pattern I to this that I have managed to deduce, but maybe 
> it happens more often when modifying inside the JavaDocs?? I do not know, as 
> I do not hit ctrl+S after every single keystroke. Also, one do get a feeling 
> that lots of Ctrl+S keeps the problem slightly away. (The Groovy Eclipse 
> editor is pretty crazy, only being correctly colorized and analyzed right 
> after a Ctrl+S, otherwise just a single extra letter will make colorizations 
> and underlinings etc move off.. One thing to notice: You get a feeling for 
> when the editor's state changes to where a Ctrl+S will fail - the 
> colorization suddenly gets very much more whacky, and you realize with dread 
> "Damn.", hit Ctrl-S, and get the dreaded "Save Failed" in your face. A 
> screenshot for when this has happened is attached)
> (Hopefully needless to say, this is so hellishly frustrating that it is very 
> hard to write this bug report in any civilized tone.)
> Found this in the Error Log, "Save All Failed" warning (!) Event Details:
> {code}
> org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
>       at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
>       at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
>       at 
> org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.updateMarkers(AbstractMarkerAnnotationModel.java:550)
>       at 
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1410)
>       at 
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1458)
>       at 
> org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:132)
>       at 
> org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
>       at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>       at 
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
>       at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>       at 
> org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)
>       at 
> org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)
>       at 
> org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456)
>       at 
> org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772)
>       at 
> org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5076)
>       at 
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1247)
>       at 
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1301)
>       at 
> org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7209)
>       at org.eclipse.ui.Saveable.doSave(Saveable.java:216)
>       at 
> org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:355)
>       at org.eclipse.ui.internal.SaveablesList$3.run(SaveablesList.java:625)
>       at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:283)
>       at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
>       at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
>       at 
> org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
>       at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>       at 
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
>       at 
> org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:291)
> {code}
> The Session Data in that window reads
> {code}
> eclipse.buildId=4.4.2.M20150204-1700
> java.version=1.8.0_25
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
> Framework arguments:  -product org.eclipse.epp.package.java.product
> Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product 
> org.eclipse.epp.package.java.product
> {code}
> This is not a new bug to me - it has AFAICR always been like this with the 
> Groovy Eclipse editor. I quite recently re-installed the entire box, with 
> fresh Eclipse, obviously hoping that this was gone, but it STILL happens like 
> this. Only thing that is strange is that this is so extremely frustrating, 
> and happens frequently enough that one should think that everybody trying to 
> do anything "serious" in Groovy in Eclipse would have screamed collectively. 
> So I am not ruling out some snowflake config on my part.
> (Another failure-scenario that also happens quite often is that "Ctrl+S" does 
> not do anything, and it then seems like the entire Eclipse is broken 
> afterwards, not being able to save anything (the changed-asterixes just does 
> not go away). I need to restart Eclipse. I do not however know if this is 
> purely Groovy-related..)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to