-
Notifications
You must be signed in to change notification settings - Fork 70
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
Comments
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) |
Hi Vlad, The URL you need to enter should be: When subclipse asks you for Authentication just leave "Use password authentication" checked and enter your sourceforge password in the Password field. That should be it. |
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. |
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? |
I get the same problem even for git, whan comparing with the initial version of a file. |
Yes indeed, I am getting the same behaviour. |
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) Do you think it might be related?
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 |
When I check the project out and open the erlide_server.erl file it is rendered just fine on screen. |
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. |
So my compares so far: 3 vs "any" fails |
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. |
Hmm... interesting... seems like the initial version of the file has something special about it... or is being treated in a different manner. |
Regarding
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. |
I tried to debug, but can't really understand what is happening. The line that has a problem is #19, 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] |
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. |
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. |
Wow awesome Vlad. 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. But, I have a workaround, which is:
Exception that happens when double clicking a file with conflict: !ENTRY org.eclipse.ui 4 0 2017-09-04 12:08:52.225 |
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. |
I have almost the same issue when comparing in synchronize view of git |
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). |
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...".
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:
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
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)
The text was updated successfully, but these errors were encountered: