Repository navigation
Closed
Labels
Milestone
Description
Seeing this in my error log view after trying a few things, so can't say exactly when and how this happened unfortunately. Maybe an LSP4E issue, maybe something on our side, not sure, but worth investigating.
org.eclipse.jface.text.BadLocationException
at org.eclipse.jface.text.TreeLineTracker.fail(TreeLineTracker.java:1054)
at org.eclipse.jface.text.TreeLineTracker.getLineInformationOfOffset(TreeLineTracker.java:1134)
at org.eclipse.jface.text.AbstractLineTracker.getLineInformationOfOffset(AbstractLineTracker.java:234)
at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.getLineInformationOfOffset(BasicStructuredDocument.java:1476)
at org.eclipse.lsp4e.LSPEclipseUtils.toPosition(LSPEclipseUtils.java:167)
at org.eclipse.lsp4e.operations.codeactions.LSPCodeActionQuickAssistProcessor.prepareCodeActionParams(LSPCodeActionQuickAssistProcessor.java:230)
at org.eclipse.lsp4e.operations.codeactions.LSPCodeActionQuickAssistProcessor.computeQuickAssistProposals(LSPCodeActionQuickAssistProcessor.java:163)
at org.eclipse.ui.internal.genericeditor.CompositeQuickAssistProcessor.computeQuickAssistProposals(CompositeQuickAssistProcessor.java:80)
at org.eclipse.jface.text.quickassist.QuickAssistAssistant$ContentAssistProcessor.computeCompletionProposals(QuickAssistAssistant.java:71)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2063)
at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:4905)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:2062)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2059)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:577)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.lambda$0(CompletionProposalPopup.java:507)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:502)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1873)
at org.eclipse.jface.text.quickassist.QuickAssistAssistant.showPossibleQuickAssists(QuickAssistAssistant.java:113)
at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:985)
at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1468)
at org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor$1.doOperation(ExtensionBasedTextEditor.java:109)
at org.eclipse.ui.texteditor.TextOperationAction.lambda$0(TextOperationAction.java:130)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:130)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at jdk.internal.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1217)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4641)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1557)
at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:522)
at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1085)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6492)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:59)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:607)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6324)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:236)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2264)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2511)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6444)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5692)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5831)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3986)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
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:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
Activity
martinlippert commentedon Dec 30, 2022
I found a way to reproduce this:
pom.xmlfilemartinlippert commentedon Dec 30, 2022
This happens only if the cursor is at position 0 of the first line and the quick-fix menu is invoked. If the cursor is at position 1, the exception doesn't happen.
martinlippert commentedon Jan 11, 2023
Maybe related, this shows up in the language server log of my dev environment after refreshing the workspace (after pulling the latest changes from git):
BoykoAlex commentedon Jan 11, 2023
LSP4E issue eclipse-lsp4e/lsp4e#355 with an easy fix.
martinlippert commentedon Jan 12, 2023
Closed as duplicate of fixed issue in lsp4e eclipse-lsp4e/lsp4e#355