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

SVN compare exception with *.erl files comparison #307

Open
kahennig opened this issue Aug 30, 2017 · 21 comments
Open

SVN compare exception with *.erl files comparison #307

kahennig opened this issue Aug 30, 2017 · 21 comments
Assignees

Comments

@kahennig
Copy link

kahennig commented Aug 30, 2017

Hi,

I saw previous reports of this exception, but I have tried many combinations of eclipse, erlang otp versions, subclipse/subversive and erlide and all have given the same problem.

Basically it already happens when browsing a repo from the "SVN Repository Exploring" Perspective and comparing two versions of a file in the "History" View.

I click on the file, and then select the two revisions to compare in the "History" view, then right click them and select "Compare...".

screenshot

I was able to replicate the problem against a project I created for this purpose on sourceforce. If anyone can help, let me know, if you have a sourceforge user (or sign up to sourceforge) you can tell me your user name and I will give you and give you access to the sourceforge SVN repo in order to replicate.

My current setup is:

  • XUbuntu 16.04 LTS
  • Eclipse IDE for Java Developers / Version: Oxygen Release (4.7.0) / Build id: 20170620-1800
  • Erlang language tools IDE 0.52.2.201707181448 org.erlide.feature.group Erlide project
    Eclipse Platform 4.7.0.v20170612-1255 org.eclipse.platform.feature.group Eclipse.org
    Erlang IDE kernel 0.115.1.201707181335 org.erlide.kernel.feature.feature.group Erlide project
  • Subclipse 4.2.3.201707071932 org.tigris.subversion.subclipse.feature.group Subclipse
  • Subclipse Integration for Mylyn (Optional) 4.2.0.1 org.tigris.subversion.subclipse.mylyn.feature.feature.group Subclipse
  • Subversion Revision Graph 4.2.0.1 org.tigris.subversion.subclipse.graph.feature.feature.group Subclipse
  • SVNKit Client Adapter 1.8.12.1 org.tigris.subversion.clientadapter.svnkit.feature.feature.group Subclipse
  • Using erlang otp 20.0 as runtime

The exception I get is:

log.txt

!ENTRY org.eclipse.ui 4 0 2017-08-30 10:20:35.692
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalArgumentException: Argument not valid
at org.eclipse.swt.SWT.error(SWT.java:4514)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9931)
at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:7916)
at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4691)
at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4768)
at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:559)
at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:548)
at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:544)
at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.textChanged(PresentationReconciler.java:212)
at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2699)
at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3320)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.invalidateTextPresentation(TextMergeViewer.java:1834)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff(TextMergeViewer.java:3539)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.update(TextMergeViewer.java:5386)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:3044)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:802)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:710)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:270)
at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:192)
at org.eclipse.compare.CompareEditorInput.internalSetContentPaneInput(CompareEditorInput.java:855)
at org.eclipse.compare.CompareEditorInput.access$7(CompareEditorInput.java:853)
at org.eclipse.compare.CompareEditorInput$10.run(CompareEditorInput.java:786)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:779)
at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:757)
at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:553)
at org.tigris.subversion.subclipse.ui.compare.SVNAbstractCompareEditorInput.createContents(SVNAbstractCompareEditorInput.java:44)
at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:444)
at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:404)
at org.eclipse.compare.internal.CompareEditor$1$1.run(CompareEditor.java:361)
at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:58)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:168)
at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:150)
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:4497)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4110)
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)

@vladdu vladdu self-assigned this Aug 30, 2017
@vladdu
Copy link
Collaborator

vladdu commented Aug 30, 2017

Yes, this is a problem that happens once in a while, but I could not reproduce it and people didn't press me enough to get it properly investigated. One of those cases of "it works for me"...

My sourceforge user is 'vladdu' (it looks like I can't create project with a local svn repo only)

@kahennig
Copy link
Author

Hi Vlad,
thanks for your reply, I have added you to my Developers group and given you some more privileges. Please let me know if you can successfully add the repo in subclipse.

The URL you need to enter should be:
svn+ssh://vladdu@svn.code.sf.net/p/erltest/code

screenshot_2017-08-30_16-12-14

When subclipse asks you for Authentication just leave "Use password authentication" checked and enter your sourceforge password in the Password field.

screenshot_2017-08-30_16-11-41

That should be it.

@vladdu
Copy link
Collaborator

vladdu commented Aug 31, 2017

Ok, thanks. I can reproduce the problem now (after fighting the svn plugins). It looks a bit difficult to debug because the exception occurs in generic eclipse code, so something goes wrong somewhere else, before that; the question being "where?".

Since the comparison works for git (and I think I got confirmation a long time ago for hg), it may be somehow a problem with the svn plugin: more exactly, maybe the APIs allow some choices to be made and svn did a different one than git. Just a guess.

Comparing the local copy to the latest from repository seems to work, I can get the exception only when comparing two revisions.

Investigation continues.

@vladdu
Copy link
Collaborator

vladdu commented Aug 31, 2017

Ok, I made some more changes to the demo files and it works fine except when one of the items being compared is the oldest version in the history (3 in this case). Could you please check if it looks like that for you too?

@vladdu
Copy link
Collaborator

vladdu commented Aug 31, 2017

I get the same problem even for git, whan comparing with the initial version of a file.

@kahennig
Copy link
Author

kahennig commented Aug 31, 2017

Ok, I made some more changes to the demo files and it works fine except when one of the items being compared is the oldest version in the history (3 in this case). Could you please check if it looks like that for you too?

Yes indeed, I am getting the same behaviour.

@kahennig
Copy link
Author

kahennig commented Aug 31, 2017

By change I happend to double click on one of the revisions and another strange behaviour cropped up. Not sure if it is related or not.

(I tried opening the other revisions and got the same error)

screenshot_2017-08-31_13-45-09

Do you think it might be related?

  • When this happens I get a new log entry in eclipse-workspace/.metadata/.log same as the one that shows up on screen.
  • I don't get any new log entries in eclipse-workspace/erlide.log

Just in case, here's the complete stack trace (copied from the eclipse windows which is the same as entry in eclipse-workspace/.metadata/.log):

EDIT: just realized that the first two lines in this exception are logging from erlide classes. Not sure if this helps any, or if this is something else totally unrelated that is happening (added bold markup to first two lines in log).

java.lang.NullPointerException
at org.erlide.ui.editors.erl.AbstractErlangEditor.createCommonActions(AbstractErlangEditor.java:121)
at org.erlide.ui.editors.erl.ErlangEditor.createActions(ErlangEditor.java:268)

at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3463)
at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:61)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:445)
at org.erlide.ui.editors.erl.AbstractErlangEditor.createPartControl(AbstractErlangEditor.java:156)
at org.erlide.ui.editors.erl.ErlangEditor.createPartControl(ErlangEditor.java:937)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:151)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:99)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:355)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:990)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:955)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:666)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:772)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:743)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:737)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:721)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:104)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:5439)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:620)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:584)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:768)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1187)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3261)
at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3176)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3158)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3153)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3117)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3098)
at org.tigris.subversion.subclipse.ui.actions.OpenRemoteFileAction$1.run(OpenRemoteFileAction.java:72)
at org.tigris.subversion.subclipse.ui.repository.RepositoryManager.run(RepositoryManager.java:375)
at org.tigris.subversion.subclipse.ui.actions.SVNAction$1.run(SVNAction.java:231)
at org.tigris.subversion.subclipse.ui.actions.SVNAction$2.run(SVNAction.java:240)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.tigris.subversion.subclipse.ui.actions.SVNAction.run(SVNAction.java:237)
at org.tigris.subversion.subclipse.ui.actions.OpenRemoteFileAction.execute(OpenRemoteFileAction.java:41)
at org.tigris.subversion.subclipse.ui.actions.SVNAction.run(SVNAction.java:56)
at org.tigris.subversion.subclipse.ui.history.SVNHistoryPage$18.run(SVNHistoryPage.java:1219)
at org.tigris.subversion.subclipse.ui.history.SVNHistoryPage$4.handleEvent(SVNHistoryPage.java:675)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
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)

@kahennig
Copy link
Author

When I check the project out and open the erlide_server.erl file it is rendered just fine on screen.

@kahennig
Copy link
Author

OK, following along with your tests I just commited another Revision (7) . And started comparing revision 7 against the previous revisions and it's failing.

@kahennig
Copy link
Author

kahennig commented Aug 31, 2017

So my compares so far:

3 vs "any" fails
7 vs "any" fails
6 vs 4 "There are no differences between the selected inputs."
6 vs 5 ok
5 vs 4 ok

@kahennig
Copy link
Author

Comparing the local copy to the latest from repository seems to work, I can get the exception only when comparing two revisions.

Investigation continues.

Regarding this, in my local svn I also get the same exception when trying to compare my local revision to a new incoming change that another person committed when usind the synchronize view. This seems to always fail. But since the exception is the same I am not sure if trying to replicate the situation with the sourceforge repo is worth it.

@kahennig
Copy link
Author

kahennig commented Aug 31, 2017

I get the same problem even for git, whan comparing with the initial version of a file.

Hmm... interesting... seems like the initial version of the file has something special about it... or is being treated in a different manner.

@vladdu
Copy link
Collaborator

vladdu commented Aug 31, 2017

Regarding

java.lang.NullPointerException
at org.erlide.ui.editors.erl.AbstractErlangEditor.createCommonActions(AbstractErlangEditor.java:121)
at org.erlide.ui.editors.erl.ErlangEditor.createActions(ErlangEditor.java:268)

I found the problem, the code assumed that the file is part of a project (and when opened like that, it isn't). It doesn't look related to the other problem.

@kahennig
Copy link
Author

I found the problem, the code assumed that the file is part of a project (and when opened like that, it isn't). It doesn't look related to the other problem.

Great Vlad!! let me know if I can be of some assitance with the original issue.

@vladdu
Copy link
Collaborator

vladdu commented Sep 3, 2017

I tried to debug, but can't really understand what is happening. The line that has a problem is #19, io:format("... ~p~n", [_R]),, at ~p.

The only clue is that the lexical scanner on one of the versions splits that string between the ~ and the p, and gets confused afterwards.

Could it be some encoding issue? Can you please check with a hex editor versions 3 and 4 of the file? I'll try to install svn myself.

Edit: Hmm, I can't see any difference, it's all ascii. I have no idea what is causing this. For svn diffs, it looks like it's between versions commited by different persons (like you noticed too) [The first version is special]

@vladdu
Copy link
Collaborator

vladdu commented Sep 3, 2017

FYI, I narrowed down the problem. The syntax higlighting in the two panes uses the same data and in some cases this causes the crash (in the others, only the highlighting is wrong). I am chasing the root cause now.

vladdu added a commit to vladdu/erlide_eclipse that referenced this issue Sep 3, 2017
@vladdu
Copy link
Collaborator

vladdu commented Sep 3, 2017

Ok, I think I fixed it; at least, it works for me now. Please update to the latest nightly 0.53.0 build and let me know how it looks like.

@kahennig
Copy link
Author

kahennig commented Sep 4, 2017

Wow awesome Vlad.
Just updated to 0.53.0 and all the cases I reported are working now!!!!

I'm looking into one more case which is still not working, but for which I just found a workaround. (I thought it was the same issue, but it seems it's not). Unfortunately I have not been able to reproduce it in the sourceforge svn repo. What I will now explain seems to work fine with the sourceforge svn.

(Later, when I have some time I will try again if I can replicate in the sourceforge svn repo)

So, basically, when I have a conflict in the Synchronize Perspective from a file that was commited with a change by another user and also changed by me, when I double click on it will give the exception shown further below.

screenshot_2017-09-04_12-22-34a

But, I have a workaround, which is:
0. I don't double click the conflicting file, instead I:

  1. right click on the file that is having the conflict
  2. click on "Compare with" -> "Latest from Repository"
  3. Voilá, the compare is rendered just fine.

workaround

Exception that happens when double clicking a file with conflict:

!ENTRY org.eclipse.ui 4 0 2017-09-04 12:08:52.225
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalArgumentException: Argument not valid
at org.eclipse.swt.SWT.error(SWT.java:4514)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9931)
at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:7916)
at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4691)
at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4768)
at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:559)
at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:548)
at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:544)
at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.textChanged(PresentationReconciler.java:212)
at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2699)
at org.eclipse.jface.text.TextViewer.fireRedrawChanged(TextViewer.java:4913)
at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:4953)
at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:4921)
at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:5003)
at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:4977)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.updateViewerDocument(TextMergeViewer.java:785)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.internalSetDocument(TextMergeViewer.java:737)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.setDocument(TextMergeViewer.java:654)
at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:3040)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:802)
at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:710)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:270)
at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:192)
at org.eclipse.compare.CompareEditorInput.internalSetContentPaneInput(CompareEditorInput.java:855)
at org.eclipse.compare.CompareEditorInput.access$7(CompareEditorInput.java:853)
at org.eclipse.compare.CompareEditorInput$10.run(CompareEditorInput.java:786)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:779)
at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:757)
at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:553)
at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:444)
at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:404)
at org.eclipse.compare.internal.CompareEditor$1$1.run(CompareEditor.java:361)
at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:58)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:168)
at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:150)
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:4497)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4110)
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)

@vladdu
Copy link
Collaborator

vladdu commented Sep 4, 2017

The exception doesn't really have anything special to do with svn. It's the compare editor and the fact that the two panes used to have some shared data, making it in some cases to crash and in others the syntax highlighting is wrong. It depends on which content is right and which one is left.

I think it's the same kind of issue for this other one. Please let me know if you can reproduce it.

@jonluechen
Copy link

I have almost the same issue when comparing in synchronize view of git
And I found that if I check out the version I want to compare into other places, and just do the file comparison without git involved, it always success without any problem.
FYI.
my eclipse:
Version: Oxygen.1a Release (4.7.1a)
Build id: 20171005-1200
erlide:
Erlang IDE kernel 0.115.1.201707181335
Erlang language tools IDE 0.54.0.201803300918
Erlide Wrangler support 0.11.0.201803082136

@vladdu
Copy link
Collaborator

vladdu commented Jun 14, 2018

Thanks. I will look at it during the summer, after my vacation. Hopefully I will see what I do wrong (or at least differently than other implementors of the compare view).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants