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

BadLocationException when creating a new Cargo Project #228

Open
mbooth101 opened this issue Jan 23, 2019 · 3 comments
Open

BadLocationException when creating a new Cargo Project #228

mbooth101 opened this issue Jan 23, 2019 · 3 comments

Comments

@mbooth101
Copy link
Contributor

mbooth101 commented Jan 23, 2019

When I create a new project like this:

File --> New Project --> Cargo Project --> (use default values in the wizard) --> Finish

I see the following error in the log:

!ENTRY org.eclipse.lsp4e 4 0 2019-01-23 12:18:05.025
!MESSAGE 
!STACK 0
org.eclipse.jface.text.BadLocationException
        at org.eclipse.jface.text.ListLineTracker.getLineInformation(ListLineTracker.java:178)
        at org.eclipse.jface.text.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:136)
        at org.eclipse.jface.text.AbstractDocument.getLineInformation(AbstractDocument.java:881)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getLineInformation(SynchronizableDocument.java:287)
        at org.eclipse.lsp4e.LSPEclipseUtils.toOffset(LSPEclipseUtils.java:149)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarker(LSPDiagnosticsToMarkers.java:137)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers$1.run(LSPDiagnosticsToMarkers.java:100)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.accept(LSPDiagnosticsToMarkers.java:114)
        at org.eclipse.lsp4e.LanguageClientImpl.publishDiagnostics(LanguageClientImpl.java:72)
        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.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
        at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
        at org.eclipse.lsp4e.LanguageServerWrapper.lambda$1(LanguageServerWrapper.java:223)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
        at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

I am running a recent I-build of Eclipse on Java 11:

Version: 2019-03 (4.11)
Build id: I20190121-1800

With these builds of Corrosion/LSP4e:

org.eclipse.corrosion_0.4.0.201901222118
org.eclipse.lsp4e_0.8.0.201812101009

@norru
Copy link
Contributor

norru commented Jan 23, 2019

If it helps, I just tried to reproduce this bug on last Snapshots and I can't see the error. It is possible that the bug has been fixed since but the snapshots haven't made to the release repo.

@mickaelistria
Copy link
Contributor

@mbooth101 Can you please try with the 2019-06 RC2 EPP package and report whether you still get this?

@mbooth101
Copy link
Contributor Author

mbooth101 commented Aug 12, 2019

Just tried a fresh workspace:

Eclipse Version: 2019-09 (4.13)
Eclipse Build id: I20190811-1800

Bundle versions:
org.eclipse.corrosion_0.4.2.201907160841
org.eclipse.lsp4e_0.11.0.201908080603

Stacktrace:

!ENTRY org.eclipse.lsp4e 4 0 2019-08-12 15:07:40.875
!MESSAGE 
!STACK 0
org.eclipse.jface.text.BadLocationException
        at org.eclipse.jface.text.ListLineTracker.getLineInformation(ListLineTracker.java:178)
        at org.eclipse.jface.text.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:136)
        at org.eclipse.jface.text.AbstractDocument.getLineInformation(AbstractDocument.java:881)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getLineInformation(SynchronizableDocument.java:287)
        at org.eclipse.lsp4e.LSPEclipseUtils.toOffset(LSPEclipseUtils.java:164)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarker(LSPDiagnosticsToMarkers.java:182)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers$1.run(LSPDiagnosticsToMarkers.java:147)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarkers(LSPDiagnosticsToMarkers.java:162)
        at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.accept(LSPDiagnosticsToMarkers.java:83)
        at org.eclipse.lsp4e.LanguageClientImpl.publishDiagnostics(LanguageClientImpl.java:72)
        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.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
        at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
        at org.eclipse.lsp4e.LanguageServerWrapper.lambda$1(LanguageServerWrapper.java:241)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
        at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Edit: BTW I am using Eclipse from my Flatpak repo, on Fedora Linux, with rustup 1.16.0 (beab5ac2b 2018-12-06).

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