7

All of the sudden last week, a single javascript file will no longer open in the compare editor.

  • I am running the latest Mars Eclipse
  • I am running the latest Subclipse
  • I sync with the repo, and see the changed file
  • When I double click or choose to compare, I either see a blank white page with "Initializing..." or a blank gray page
  • it is ONLY with one specific text .js file ... all other files in the project, and other projects diff just fine.
  • the file is 37,880 bytes
  • I have deleted the subversion settings files, and they were recreated
  • I have checked the preferences and ignore whitespace

It is only this ONE file ... and it is a main file of a node.js project. It used to diff just fine, and all of the sudden last week this one file will no longer diff and throws this exception.

When I look in the log, I see the following exception:

!ENTRY org.eclipse.ui 4 0 2016-04-14 12:38:08.535 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException) 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: java.lang.IllegalArgumentException at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490) at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2696) at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:319) at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:436) at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1175) at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262) at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887) at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647) at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:284) at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:243) at org.eclipse.compare.structuremergeviewer.StructureCreator.internalCreateStructure(StructureCreator.java:121) at org.eclipse.compare.structuremergeviewer.StructureCreator.access$0(StructureCreator.java:109) at org.eclipse.compare.structuremergeviewer.StructureCreator$1.run(StructureCreator.java:96) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.compare.internal.Utilities.runInUIThread(Utilities.java:859) at org.eclipse.compare.structuremergeviewer.StructureCreator.createStructure(StructureCreator.java:102) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.createStructure(StructureDiffViewer.java:155) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.refresh(StructureDiffViewer.java:133) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.setInput(StructureDiffViewer.java:104) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:342) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$2.run(StructureDiffViewer.java:74) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$6.run(StructureDiffViewer.java:322) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:319) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:307) at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureDiffViewer.compareInputChanged(JavaStructureDiffViewer.java:143) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.inputChanged(StructureDiffViewer.java:278) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701) at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:277) at org.eclipse.compare.internal.CompareStructureViewerSwitchingPane.setInput(CompareStructureViewerSwitchingPane.java:132) at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:747) at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555) at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462) at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422) at org.eclipse.compare.internal.CompareEditor$3.run(CompareEditor.java:378) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162) at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 23 more

2 Answers 2

17

I don't have a solution, but I ran into the same problem and found a workaround. I switched off "Open structure compare automatically" in the eclipse preferences under "General" -> "Compare/Patch". Then I was able open the file in the compare editor.

1
  • 1
    worked for me, i dont understand what the thing does anyways, in the eclipse docs it just says "Open structure compare automatically" -> "Makes an additional information area visible which shows differences in the underlying structure of the resources being compared. This information may not be available for all comparisons." Apr 12, 2017 at 14:05
2

This looks like Eclipse bug 390913 which has been open for some time but doesn't seem to have made any progress.

1
  • yep ... and like some of that comments on that bug I'm at a loss of what exactly is in the text of this file that is causing the problem. If I had some idea I would edit the file and remove the offending content ... but of course it's also silly that Eclipse is throwing the exception in the first place. :-/ Apr 14, 2016 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.