Open miklossy opened 5 years ago
This is a comparison of a file from a commit with the current working tree.
Cannot reproduce in Eclipse 2018-12 with Xtext 2.16.0 and EGit nightly.
Cannot reproduce in Eclipse 2019-03 with Xtext 2.17.0 and EGit 5.3.0.
Compare my comments in eclipse/xtext-eclipse#1009; I would expect this be fixed by the EGit 5.3.0 changes especially if that file Foo.xtend was not in the Eclipse workspace (project not imported).
i cannot reproduce this neither @miklossy can you please retest with 2019-03 and Xtext 2.17 / EGit 5.3 (i used the RC1 dsl distro from here https://www.eclipse.org/downloads/packages/release/2019-03
I can reproduce the bug with Eclipse 2018-12, Xtext 2.18.v20190316 and EGit 5.2.0. I have the possibility to retest this with Eclipse 2019-03, and EGit 5.3.0. as soon as these components are released.
@miklossy release should be out now
@cdietrich I can still reproduce the problem with Eclipse 2019-09 and EGit 5.3.0 could you please also try to reproduce again? Please note that you have to save the file after editing to see the exception. If it still does not help, click on the Swap Left and Right View
button. While trying to investigate the problem, I see two different exceptions:
java.lang.NullPointerException
at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.setDocument(TextMergeViewer.java:662)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:2998)
at org.eclipse.xtext.ui.compare.DefaultMergeViewer.updateContent(DefaultMergeViewer.java:95)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:794)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.refresh(ContentMergeViewer.java:770)
at org.eclipse.jface.viewers.ContentViewer.setContentProvider(ContentViewer.java:254)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.setContentProvider(ContentMergeViewer.java:541)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.updateContentProvider(ContentMergeViewer.java:545)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.lambda$3(ContentMergeViewer.java:400)
at org.eclipse.ui.preferences.ScopedPreferenceStore$2.run(ScopedPreferenceStore.java:348)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:345)
at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:655)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer$2.run(ContentMergeViewer.java:919)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568)
at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:439)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
java.lang.IllegalStateException: Cannot disconnect document that is not connected
at org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource.disconnect(DocumentBasedDirtyResource.java:69)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.removeDirtyStateSupport(DirtyStateEditorSupport.java:466)
at org.eclipse.xtext.ui.editor.XtextEditor.dispose(XtextEditor.java:584)
at org.eclipse.xtext.ui.compare.DefaultMergeViewer.disposeEditors(DefaultMergeViewer.java:138)
at org.eclipse.xtext.ui.compare.DefaultMergeViewer.handleDispose(DefaultMergeViewer.java:129)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.release(Widget.java:812)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:931)
at org.eclipse.swt.widgets.Widget.release(Widget.java:815)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:931)
at org.eclipse.swt.widgets.Widget.release(Widget.java:815)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:931)
at org.eclipse.swt.widgets.Widget.release(Widget.java:815)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:931)
at org.eclipse.swt.widgets.Widget.release(Widget.java:815)
indeed problem is still there in the "swap" usecase (local on the right)
An internal error occurred during: "XtextReconcilerJob". '_new!=null && old!=null && !old.getURI().equals(_new.getURI())' constraint violated, old was revision:/Demo.xtend new was: platform:/resource/a/src/b/Demo.xtend
fTextWidget is null in TextViewer, but why (looks like fSourceViewer in TextMergeViewer is an old instance that is kept (as a document listener)
@miklossy if you restart: does it happen on swap only?
yes
=> there is something wrong with swap and then the state is corrupt permanently cause old listeners
@miklossy Does this still happen with 2019-06/09 ? With https://git.eclipse.org/r/#/c/148467/ it is planned to change the default direction of compare views, so we should make sure that this does not make the problem more likely.
well we dont know if the problem is caused by switching or the intial direction. i thought its cause by switching 6 month ago
@kthoms Switching the default direction of compare views is a very good idea, please go ahead! If that change makes this problem more likely, it is more likely that it gets fixed!
I also noticed an exception
while editing an Xtend file in the compare view: