Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upon save of editor: "Save Failed: assertion failed" #155

Closed
PascalSchumacher opened this issue Nov 24, 2015 · 82 comments
Closed

Upon save of editor: "Save Failed: assertion failed" #155

PascalSchumacher opened this issue Nov 24, 2015 · 82 comments
Assignees
Labels

Comments

@PascalSchumacher
Copy link
Member

see https://issues.apache.org/jira/browse/GROOVY-7570 for details

@TedL
Copy link

TedL commented Oct 13, 2016

Any updates in this matter? I'm experiencing the same thing with Neon(4.6.9) and Groovy-Eclipse 2.9.2

@eric-milles
Copy link
Member

Do you have a minimal source file that can consistently reproduce this? I have seen the editor remain unsaved because organize imports takes several seconds. This is the reason the semantic highlighting (coloring) is out of alignment. Is this happening with or without Organize Imports enabled as a save action?

@j4yk
Copy link

j4yk commented Oct 13, 2016

It happens for me without having Organize Imports among the save actions. But I do see the misaligned highlighting quite often. Have turned off all save actions for now and will see if that makes a difference. Reproducing the problem is hard, since reopening the file (losing the changes underway) or in severe cases restarting Eclipse lets me save the file again.

@eric-milles
Copy link
Member

eric-milles commented Oct 13, 2016

When you get the assertion error, is the file in a complete state (fully compileable) or does it have syntax errors?

The semantic highlighting happens as one of the save tasks. I'm not sure if it is synched up with any of the others, which may cause further edits or undos of edits. I have been looking into running the semantic highlight job more frequently. I have experienced the same issues you are indicating with respect to syntax coloring.

@TedL
Copy link

TedL commented Oct 14, 2016

Unfortunately I have not found a way of reproducing this error, but it seems as if it often occurs while writing closures both in code and javadoc.

No I don't have save actions enabled but I do have the problem with the semantic highlighting and also that the content assist stops working.

I would say that most of the times the problem occurs that the file doesn't have syntax errors.

@TedL
Copy link

TedL commented Oct 21, 2016

Hi again,

Has anybody had the time to look in to this yet?
I Just got the save failed error again and this time I saved the stacktrace.
SaveFailed.txt

@eric-milles
Copy link
Member

Here is the code at the point of the assertion:

    /**
     * Updates the markers managed by this annotation model by calling
     * all registered marker updaters (<code>IMarkerUpdater</code>).
     *
     * @param document the document to which this model is currently connected
     * @throws CoreException if there is a problem updating the markers
     */
    public void updateMarkers(IDocument document) throws CoreException {

        Assert.isTrue(fDocument == document);

Up one stack frame there is:

            // If here, the dirty state of the editor will change to "not dirty".
            // Thus, the state changing flag will be reset.
            if (info.fModel instanceof AbstractMarkerAnnotationModel) {
                AbstractMarkerAnnotationModel model= (AbstractMarkerAnnotationModel) info.fModel;
                model.updateMarkers(document);
            }

@pjdarton
Copy link

Happening here too - 3rd time today (which is why I found this thread).
I get much the same stacktrace as TedL posted earlier.

What I'm experiencing is that the syntax highlighting is poor (often "out of date" w.r.t. the code) and problems with that seems to go hand-in-hand with a failure to display Javadoc when mouseover a method). Often, closing the editor and re-opening it fixes these issues.
Ditto issues with autocomplete.
Whilst highlighting and autocomplete issues are annoying, when problems then prevent you from saving the file, data loss is then inevitable :-(

I can't be sure that all these issues are related, but there seems to be a significant "disconnect" between the actual file content and what is shown on screen - maybe that's the underlying cause of this "assert"?

@pjdarton
Copy link

I've noticed that problems seem to be preceeded by a flood of "Unhandled event loop exception" errors.
I was holding down the space bar (to indent some code to match the surrounding lines) and saw a flood of these errors appear in the "Error Log" view.
stacktrace2.txt
This was then followed by an "assert failed" upon saving the file.

Perhaps the highlighting code is relying on being able to handle all the repercussions of one keypress before the next arrives? If the user was to cause a new change before computation for the previous had completed, the next calculation could start before the first has finished and thus, if the code isn't entirely thread-safe, "Bad Things" might happen which could lead to an internal assert failing.
This whole problem "smells" like the thread-safety issue to me :-/

@eric-milles
Copy link
Member

There is a background process for Java and Groovy that attempts to reconcile the state of the editor. The syntax coloring is a listener for this event. There is a sync flag to prevent multiple occurrences of highlighting going on. It may be that there should be a cancel so that the last one runs and you see coloring that is more aligned with your editor. If you add a single space/tab and wait a tick, the coloring should catch up.

As for the assertion errors, I've seen several integrity checks related to source positions and the like. If any fails, some of the save actions barf and this stops the save process. I've tried to shore up Organize Imports. I'm not sure if you have other save actions going on. You can try to disable them all; some are inherited from your Java settings.

@pjdarton
Copy link

I have no "save actions" enabled at all - everything that can be turned off is turned off.
My "save" should simply write the current contents to disk - no more, no less.

In my experience, the coloring doesn't always "catch up" - it often ends up "out of sync" and then I get the impression that the coloring/styling of the editor contents is a set of "From character X to character Y, use style Z" rules where X and Y refer to offsets within the file which were valid when the file was loaded but which have since been invalidated by changes. The only way of ensuring that the coloring "catches up" is to close and re-open the editor - merely waiting doesn't do it.

@eric-milles
Copy link
Member

eric-milles commented Oct 26, 2016

So yes, semantic highlighting / syntax coloring is a JDT API where a set of ranges+styles is computed and applied. This is the same for your Java files. Usually it computes and applies so quickly that you are unaware of this. At the moment, Greclipse is having some trouble during the save process and so the highlighting is delayed or cancelled altogether.

As for saving. Eclipse is an Integrated Development Environment. There are many actions that take place when a file is saved. I think what is happening is a failure in reconciliation and so Eclipse thinks it is unsafe to commit the working copy to disk.

In your Eclipse preferences, do you have QuickDiff enabled? This is found under General -> Editors -> Text Editors -> Quick Diff. This appears to be the only feature that leverages the AnnotationModel.

@eric-milles
Copy link
Member

Regarding the original stack trace (included below) to save others from the redirection. The AnnotationModel is checking that its fDocument field is the same as was passed in to updateMarkers(IDocument). There are 2 possibilities here that I can see:

  1. the document was disconnected from the AnnotationModel (clears fDocument) before updateMarkers() is run.

  2. The document reference in CompilationUnitInfo was altered before updateMarkers().

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)

@pjdarton
Copy link

I did have QuickDiff enabled, yes.
I've now turned it off and I guess we'll see (over the next few days) if that's helped...

@pjdarton
Copy link

pjdarton commented Nov 1, 2016

I disabled QuickDiff.
Then, on the first day when I did some non-trivial Groovy editing, I got another assert error.
(Fortunately, I've enabled auto-save on a short delay, so I didn't loose much work)

i.e. disabling QuickDiff did not prevent the problem.

@eric-milles
Copy link
Member

Was the error you are now seeing different? These assertions failing during save are a set of problems. All must be fixed or some additional error handling must be added to stop the save from failing.

@eric-milles
Copy link
Member

The original error (bug link at the top) lists Eclipse 4.4.2. Is this what you are running on as well?

@pjdarton
Copy link

pjdarton commented Nov 1, 2016

I'm not using 4.4.2, I'm using "Neon.1a Release (4.6.1)".
The error I'm seeing is substantially the same one. Some line numbers differ a little, much as one might expect from minor coding differences between versions. The classes listed in the stacktrace are the same, in the same order.
The stacktraceelements further down the list do differ depending on whether the save was caused by me (pressing save) or by the auto-save, but that's to be expected.

FYI the stacktrace I get (to the same depth as you quoted above) is:

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:612)
    at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1440)
    at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1488)
    at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:130)
    at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:67)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:107)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$$Lambda$121.000000002A3F6270.run(Unknown Source)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:128)
    at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:73)
    at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63)
    at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:458)
    at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:761)

@neuneuraxis
Copy link

I have the same issue. This is my eclipse log :
Message "Save All Failed"

eclipse.buildId=4.5.2.M20160212-1500
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
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:611)
    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:70)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:108)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:130)
    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:1244)
    at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1298)
    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:357)
    at org.eclipse.ui.internal.SaveablesList$3.run(SaveablesList.java:665)
    at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:285)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:463)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:371)
    at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2181)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2177)
    at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:293)
    at org.eclipse.ui.internal.SaveablesList.saveModels(SaveablesList.java:675)
    at org.eclipse.ui.internal.SaveablesList.saveModels(SaveablesList.java:632)
    at org.eclipse.ui.internal.SaveablesList.promptForSaving(SaveablesList.java:617)
    at org.eclipse.ui.internal.SaveablesList.promptForSavingIfNecessary(SaveablesList.java:449)
    at org.eclipse.ui.internal.SaveablesList.preCloseParts(SaveablesList.java:405)
    at org.eclipse.ui.internal.SaveablesList.preCloseParts(SaveablesList.java:355)
    at org.eclipse.ui.internal.SaveablesList.preCloseParts(SaveablesList.java:350)
    at org.eclipse.ui.internal.WorkbenchWindow$7.save(WorkbenchWindow.java:591)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.savePart(PartServiceImpl.java:1342)
    at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.closePart(StackRenderer.java:1277)
    at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.access$4(StackRenderer.java:1260)
    at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$11.close(StackRenderer.java:1145)
    at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1921)
    at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:335)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

Message "Unhandled event loop exception"

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.core.runtime.AssertionFailedException: assertion failed: )
    at org.eclipse.swt.SWT.error(SWT.java:4491)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: 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.jface.text.source.AnnotationModel.getRegionAnnotationIterator(AnnotationModel.java:742)
    at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:700)
    at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:718)
    at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:532)
    at org.eclipse.jface.text.source.AnnotationRulerColumn.redraw(AnnotationRulerColumn.java:815)
    at org.eclipse.jface.text.source.AnnotationRulerColumn$6.run(AnnotationRulerColumn.java:798)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 23 more

@eric-milles
Copy link
Member

Can anyone that this is still happening for send a list of steps to recreate? That is, starting from no Eclipse at all, say what package you downloaded and what plug-ins you added and what settings you may have set in your workspace? I have not run into this after using the plug-in for quite some time in various scenarios, so I think there is an extra plug-in that you have or setting enabled that I do not.

@pjdarton
Copy link

I have my suspicions regarding end-of-line codes...
If I use the refactor "Extract local variable" then the editor "goes all weird" - its ability to show me the code is compromised and it gets confused as to what's what each line, with some lines showing up "double" and others only appearing as you cursor-through them.
Closing and re-opening the file fixes that... except when I came to "diff" my changes before delivering them to my source-code repo (Rational Team Concert, aka "RTC"), I was told that the file now had inconsistent EOL code (something confirmed by BeyondCompare) - my file now had some lines with unix-style line endings, whereas it was previously 100% DOS line endings (CR+LF).

I'm pretty sure that this isn't exactly the same problem, but it is symptomatic of the underlying meta-data getting out of step with the file content, and if you're developing purely on Linux then you'd never see problems arising from a failure to cope with DOS line endings (on a platform where that's the default).

From my p.o.v., I've got CheckStyle, CodeNarc and RTC plugins installed into a J2EE Eclipse along with the groovy support. None of those plugins should be doing anything clever "in the background" that could affect the way files are displayed but then this shouldn't be throwing asserts either... :-/
While I've lost count of the number of times I've been hit by this issue, I do know that it's always the same kind of code - groovy code designed to work with the Jenkins DSL plugin. This might be a relevant factor ... but it might not as 99% of my groovy work is on groovy code that uses the Jenkins DSL plugin so it's no real surprise that that's when I see groovy/Eclipse problems...

@eric-milles
Copy link
Member

I can try and take a look. CodeNarc or something in J2EE package may be the one using the AnnoationModel. Could you try removing CodeNarc and see if this stops the exceptions? Do you use the Package Explorer or Project Explorer typically? Also, what perspective does this happen under? I use the Java and Debug perspectives pretty much exclusively. Not sure if these errors are tied to one of the J3EE perspectives.

Not all refactorings are patched for Groovy and so some may run a bit oddly for Groovy sources. After you run a refactor, you can choose File > Convert Line Delimeters To > ... to get a consistent set of endings. Not exactly a fix, but can get you out of a jam if your source control is checking for consistency.

@eric-milles
Copy link
Member

My guess is that the Rational Team Concert is what is interested in the annotated model. From the demo video I see that it is collecting all source code changes made for submission as a changeset. Are you able to quickly try some of the same editing actions with a sample eclipse install that does not have RTC?

@GerdLorscheid
Copy link

I have the same kind of problems. I develop a Swing UI based on groovy and run into this problem once in an hour of developing. Very anoying is that it is not possible to copy or save the source when it happens. If you have not saved for some time, bad luck.
But what is interesting also is: When I have the problem that Eclipse gets lost, for example cannot update the coloring, Then adding or removing a semicolon at the end of a statement helps a lot. Obviously when handling semicolons, checks are done, which are missing somewhere else.
For example after editing I cannot set a breakpoint at a line I had edited before. After I add a semicolon at its end (and remove it again) I can set the breakpoint.

@eric-milles
Copy link
Member

@GerdLorscheid Could you say what your Eclipse setup is like and what types of files you are editing when this happens? Without some recreation steps, there is little I can do.

@GerdLorscheid
Copy link

GerdLorscheid commented Dec 21, 2016 via email

@GerdLorscheid
Copy link

GerdLorscheid commented Dec 30, 2016 via email

@tommyb82
Copy link

Just upgraded STS to latest version 3.8.3.201612191259-RELEASE yesterday and started seeing this bug when editing / saving Groovy source files. I've seen this in the past so must be a regression somewhere (can't remember the problematic version combination previously, but it was stable before I upgraded..)

Eclipse:
Version: 4.6.2.v20161124-1529
Build id: M20161124-1400

With Groovy Eclipse: 2.9.2.xx-201612170628-e46

I have save actions enabled. Not sure if it's related, but I've also noticed that hitting CTRL+S when editing groovy source files (particularly larger ones with lots of imports + methods) seems to save the file but then it appears to immediately have unsaved changes again.

Stack trace from workspace log:

!ENTRY org.eclipse.ui 2 0 2016-12-30 13:22:00.403
!MESSAGE Save All Failed
!STACK 0
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:613)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1440)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1488)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:130)
	at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:67)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:107)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$$Lambda$70/503804335.run(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:128)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:73)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:458)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:761)
	at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5025)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1269)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1323)
	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7117)
	at org.eclipse.ui.Saveable.doSave(Saveable.java:220)
	at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:358)
	at org.eclipse.ui.internal.SaveablesList$3.run(SaveablesList.java:667)
	at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:286)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
	at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2184)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2180)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:294)
	at org.eclipse.ui.internal.SaveablesList.saveModels(SaveablesList.java:677)
	at org.eclipse.ui.internal.WorkbenchPage.saveAll(WorkbenchPage.java:3672)
	at org.eclipse.ui.internal.WorkbenchPage.saveAllEditors(WorkbenchPage.java:3650)
	at org.eclipse.ui.internal.handlers.SaveAllHandler.execute(SaveAllHandler.java:48)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:353)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:155)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
	at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
	at org.eclipse.jface.action.ActionContributionItem$$Lambda$34/303204425.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

@eric-milles
Copy link
Member

eric-milles commented Jan 1, 2017

@GerdLorscheid The file seems to be missing. Can you say if the sequence of actions produces the error everytime? If you open the Groovy Event Console, do you see anything when performing these steps? Is it possible to try and break this down to a very small eclipse project and then zip and attach that?

@tommyb82 I've seen the annotation model assertion failure. That is how this issue was raised. What I need is a sequence of steps to reproduce. I have not run into it myself, so I need to know if there is a common plug-in that each of you is using that is in conflict. And I would need a concrete recreation scenario. It has to be a simple Eclipse project and setup that when a list of steps are performed the exception trips.

@GerdLorscheid
Copy link

GerdLorscheid commented Jul 7, 2017 via email

@eric-milles
Copy link
Member

eric-milles commented Jul 7, 2017 via email

@eric-milles
Copy link
Member

I had this happen locally for the first time. Looking at my Error Log, it looks like this is what started the situation off:

java.lang.NullPointerException
	at org.eclipse.ui.texteditor.AbstractTextEditor$TextListener$1.run(AbstractTextEditor.java:622)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

The last line of this snippet is the line with the NPE. DocumentProvider.getDocument() is apparently never supposed to return null. The provider is supplied by the editor, however GroovyEditor does not override this in any way as far as I can tell.

	class TextListener implements ITextListener, ITextInputListener {

		/** The posted updater code. */
		private Runnable fRunnable= new Runnable() {
			@Override
			public void run() {
				fIsRunnablePosted= false;

				if (fSourceViewer != null) {
					updateContentDependentActions();

					// remember the last edit position
					if (isDirty() && fUpdateLastEditPosition) {
						fUpdateLastEditPosition= false;
						ISelection sel= getSelectionProvider().getSelection();
						IEditorInput input= getEditorInput();
						IDocument document= getDocumentProvider().getDocument(input);

						if (fLocalLastEditPosition != null) {
							document.removePosition(fLocalLastEditPosition);

I'll keep trying to recreate; I have a fairly good idea of my edits just before the save failed. And see if I can tracks back to the reason the document has been disconnected from the provider.

@eric-milles
Copy link
Member

https://bugs.eclipse.org/bugs/show_bug.cgi?id=519426 submitted to Eclipse Platform UI

@GerdLorscheid
Copy link

GerdLorscheid commented Jul 8, 2017 via email

@eric-milles
Copy link
Member

eric-milles commented Jul 8, 2017

@GerdLorscheid Would you mind sharing a snippet of your class Repertoire. There are map entry expression errors for calcMinMax, checkFinisher, checkFinisher2 and a few others. I'd like to know what the map expression looks like in those methods.

Also, there is an inner class ChangeEntry, would you mind sharing at least the class declaration line of Repertoire and ChangeEntry, including any annotations or other alterations/modifiers?

@groovy groovy deleted a comment from GerdLorscheid Jul 8, 2017
@johnvlittle
Copy link

johnvlittle commented Jul 11, 2017

Just in case it helps, I had this again today. I added 5 lines of code to an existing grails goovy controller, which was something like:

	/**
	 * 
	 * @return
	 */
	def search() {
		
	}

I made no other changes. When I came back to the editor, the source code was gone and just the word "Error" was shown in the UI. If I then try to save the file, I get the assertion failed. so the problem happened before I tried to save. As eclipse has no local history (unlike intellij), and it doesnt seem to have any way to keep a backup of work in progress, I lost the changes. the app (grails run-app) was running at the time, but as I hadnt saved my work, it had not reloaded.

@eric-milles
Copy link
Member

eric-milles commented Jul 11, 2017 via email

@johnvlittle
Copy link

This problem is happening more and more frequently. E.g. 10 times a day. Each time I lose all the changes I made to the file as eclipse doesnt seem to have any local history. I would try an updated plugin, but you would need to give me instrucitons on how to install it.

@johnvlittle
Copy link

I officially give up with eclipse for grails. I have been completely unable to add a line of code to my controllers as saving always generates this error. I am going to use notepad++ then perhaps go back to laravel as this works well in all IDEs.

@eric-milles
Copy link
Member

eric-milles commented Jul 11, 2017 via email

@johnvlittle
Copy link

johnvlittle commented Jul 11, 2017

FYI I upgraded neon2 to neon3 a week ago.

I have dropped in these files. Note, I dont think the problem is with save - the error occurs before you save it, but you dont get the assertion failed until you try to save. I have a lot of UI errors happen when it goes wrong, before I hit save, e.g.

java.lang.NullPointerException at org.eclipse.ui.texteditor.SelectMarkerRulerAction.includesRulerLine(SelectMarkerRulerAction.java:290) at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.findJavaAnnotation(JavaSelectAnnotationRulerAction.java:157) at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.update(JavaSelectAnnotationRulerAction.java:108) at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.update(AbstractRulerActionDelegate.java:127) at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.setActiveEditor(AbstractRulerActionDelegate.java:87) at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:71) at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:80) at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:129) at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:344) at org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:309) at org.eclipse.ui.internal.WorkbenchPage.access$18(WorkbenchPage.java:291) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:209) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$3.run(PartServiceImpl.java:250) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:247) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:757) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:682) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:677) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:1345) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:1284) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.closePart(StackRenderer.java:1296) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.access$2(StackRenderer.java:1278) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$7.close(StackRenderer.java:1163) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1930) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:338) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519) at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

@eric-milles
Copy link
Member

eric-milles commented Jul 11, 2017 via email

@eric-milles
Copy link
Member

What I'm looking for is when this issue occurs, can you track back to the last log entry for the editor disconnect and send me that stack trace. The ruler action NPE is the same as the save failed; asking the editor for its IDocument returns null. I need to understand why null is coming from the document provider.

@eric-milles
Copy link
Member

@PascalSchumacher I'm looking for help recreating this issue. Without that I cannot hope to fix it. Would you be able to provide some additional details or run some test patches with extra logging?

@PascalSchumacher
Copy link
Member Author

@eric-milles Sorry, I personally only get the error only like once a year. I just created the issue because I closed https://issues.apache.org/jira/browse/GROOVY-7570

@mauromol
Copy link

mauromol commented Sep 1, 2017

This error happens to me, too, whenever I work with a Groovy file for a long time.
I can perfectly understand the difficulty to reproduce it consistently. What can I do the next time this problem occurs to help you to investigate?

Also, I don't understand whether the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=519426 brings any benefit and, if so, if it's the case to request a backport at least for Oxygen...

@eric-milles eric-milles added the bug label Sep 7, 2017
@eric-milles
Copy link
Member

Can anyone confirm this is still happening with 20171017 snapshots or later? There was a fix for JavaElement which was closing CompilationUnit buffers pre-maturely. This may have made an improvement in this area.

@mustangxu
Copy link

I have 2.9.2.xx-201710180153-e47, so far works good with no issue.

@mauromol
Copy link

mauromol commented Nov 2, 2017

During the last week of work with Groovy, this has not happened to any more. I will keep on test.

@mauromol
Copy link

mauromol commented Nov 9, 2017

I've worked a lot with Greclipse recently and I never saw this problem again. Before your latest fix, this occurred 2-3 times a day. I think this can be considered fixed and possibly reopened if ever needed.

@grimkid
Copy link

grimkid commented Dec 6, 2017

Hey hi!
I am having this issue in eclipse neon for rcp and rap developers when trying to save a plugin.xml file

@eric-milles
Copy link
Member

eric-milles commented Dec 6, 2017 via email

@NoriNoNoroi
Copy link

I've had this problem occur when making a GUI using SWT after I moved some code relating to creating TableItem's before the initialization of the related Table. And, since Eclipse tries auto compile GUI related code, I got a null pointer exception that I couldn't get out of (aka. mess with auto-generated code at your own risk ^^). The quick solution, copy/paste the offending file(s) to notepad and close Eclipse, reopen, paste, and try to find out what you did wrong.

@eric-milles
Copy link
Member

@NoriNoNoroi Can you open a new issue with your specific error log or stack trace and recreation steps?

@groovy groovy locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests