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

Cleaning workspace modifies source files #58

Open
anthonyvdotbe opened this issue Oct 29, 2023 · 0 comments
Open

Cleaning workspace modifies source files #58

anthonyvdotbe opened this issue Oct 29, 2023 · 0 comments
Labels
Non-reproducible Unable to recreate/reproduce the issue described

Comments

@anthonyvdotbe
Copy link
Contributor

When I do Clean Workspace (in an attempt to have error reporting catch up), sometimes my source files are modified. I have already noticed the same behavior when editing source files outside of VS Code (e.g. formatting with google-java-format).

There's this in the logs:

java.lang.IndexOutOfBoundsException: Invalid line index=63 >= lineCount=35
	at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:68)
	at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:898)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1406)
	at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:873)
	at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
	at org.netbeans.modules.java.lsp.server.Utils.getOffset(Utils.java:340)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.lambda$didChange$33(TextDocumentServiceImpl.java:1648)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.didChange(TextDocumentServiceImpl.java:1644)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
Caused: java.lang.RuntimeException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
[catch] at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.lambda$consume$0(Server.java:295)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.consume(Server.java:293)
	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:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMejava.lang.IndexOutOfBoundsException: Invalid line index=79 >= lineCount=35
	at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:68)
	at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:898)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1406)
	at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:873)
	at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
	at org.netbeans.modules.java.lsp.server.Utils.getOffset(Utils.java:340)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.lambda$didChange$33(TextDocumentServiceImpl.java:1648)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.didChange(TextDocumentServiceImpl.java:1644)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
Caused: java.lang.RuntimeException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
[catch] at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.lambda$consume$0(Server.java:295)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.consume(Server.java:293)
	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:572)
	at java.base/java.util.concurrent.FutureTask.rjava.lang.IndexOutOfBoundsException: Invalid line index=63 >= lineCount=35
	at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:68)
	at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:898)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1406)
	at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:873)
	at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
	at org.netbeans.modules.java.lsp.server.Utils.getOffset(Utils.java:340)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.lambda$didChange$33(TextDocumentServiceImpl.java:1648)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
	at org.netbeans.modules.java.lsp.server.protocol.TextDocumentServiceImpl.didChange(TextDocumentServiceImpl.java:1644)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
Caused: java.lang.RuntimeException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
[catch] at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.lambda$consume$0(Server.java:295)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.netbeans.modules.java.lsp.server.protocol.Server$ConsumeWithLookup$1.consume(Server.java:293)
	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:572)
@Achal1607 Achal1607 added the Non-reproducible Unable to recreate/reproduce the issue described label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Non-reproducible Unable to recreate/reproduce the issue described
Projects
None yet
Development

No branches or pull requests

2 participants