Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Repeated errors after upgrading to Eclipse 2020-09
Repeated errors after upgrading to Eclipse 2020-09 [message #1835102] Tue, 24 November 2020 19:02 Go to next message
Alejandro Trillo is currently offline Alejandro TrilloFriend
Messages: 1
Registered: November 2020
Junior Member
Today I upgraded my Eclipse installation from 2019-12 to 2020-09, and now I'm running in error popups all the time, all about StringIndexOutOfBoundsException s.

I haven't touched anything since the upgrade, other than having to upgrade Java to 11 AFTER upgrading (the upgraded Eclipse still launched once with Java 8, and I think I upgraded my workspace there, since I didn't know I had to update Java yet).

Now there are even some files that I can't even open ("Editor could not be initialized." or "Failed to create the part's controls", with the same error) (this is happening to me with files I have edited in respect to Git commited files). Even selecting those files in the Project Editor causes the error

Stacktraces vary, but they always reference the same exception, offset, count and length.

Any advice on how could I fix it? I've already reinstalled Eclipse without luck, would prefer keeping my workspace.

The following is one of the stacktraces, in case it's useful:

java.lang.StringIndexOutOfBoundsException: offset 22165, count -18139, length 46166
	at java.base/java.lang.String.checkBoundsOffCount(String.java:3304)
	at java.base/java.lang.String.rangeCheck(String.java:280)
	at java.base/java.lang.String.<init>(String.java:276)
	at org.eclipse.jdt.internal.compiler.parser.Scanner.disambiguatedToken(Scanner.java:5491)
	at org.eclipse.jdt.internal.compiler.parser.Scanner.getNextToken(Scanner.java:1461)
	at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.readTokenFromScanner(LexStream.java:84)
	at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.token(LexStream.java:154)
	at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.kind(LexStream.java:194)
	at org.eclipse.jdt.internal.compiler.parser.diagnose.DiagnoseParser.diagnoseParse(DiagnoseParser.java:312)
	at org.eclipse.jdt.internal.compiler.parser.Parser.reportSyntaxErrors(Parser.java:14010)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12843)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:13152)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.parseStatements(MethodDeclaration.java:225)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.parseMethods(TypeDeclaration.java:1138)
	at org.eclipse.jdt.internal.compiler.parser.Parser.getMethodBodies(Parser.java:11825)
	at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:1058)
	at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:195)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312)
	at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:267)
	at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType(JavaElement.java:281)
	at org.eclipse.jdt.internal.core.CompilationUnit.getTypes(CompilationUnit.java:968)
	at org.eclipse.jdt.internal.corext.refactoring.util.JavaElementUtil.getMainType(JavaElementUtil.java:99)
	at org.eclipse.jdt.internal.corext.refactoring.RefactoringAvailabilityTester.getSingleSelectedType(RefactoringAvailabilityTester.java:157)
	at org.eclipse.jdt.ui.actions.ExtractClassAction.selectionChanged(ExtractClassAction.java:85)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:262)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:257)
	at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1178)
	at org.eclipse.ui.navigator.CommonViewer.handleSelect(CommonViewer.java:466)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1207)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:237)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4195)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3612)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	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:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)



Thanks!
Re: Repeated errors after upgrading to Eclipse 2020-09 [message #1835248 is a reply to message #1835102] Sat, 28 November 2020 04:56 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31702
Registered: July 2009
Senior Member
I see that stack trace in this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=567319

I think you would need to update to the 2020-12 version (which is not yet released) to get the fix for this bug.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Issue with log4j rolling appender 1.2.16
Next Topic:Plugin to synchronizes UML class diagram with the code (in C++)?
Goto Forum:
  


Current Time: Tue Jan 19 22:20:41 GMT 2021

Powered by FUDForum. Page generated in 0.02927 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top