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

Empty log file string crashes the server #904

Closed
deathaxe opened this issue Oct 8, 2020 · 0 comments · Fixed by #921
Closed

Empty log file string crashes the server #904

deathaxe opened this issue Oct 8, 2020 · 0 comments · Fixed by #921
Assignees
Labels
bug Something isn't working
Milestone

Comments

@deathaxe
Copy link

deathaxe commented Oct 8, 2020

Passing an empty log file string ("xml.logs.file": "") via initalizationOptions crashes the language server.

The expected behavior is an empty string to be handled the same way as null, which just doesn't create a log file.

Traceback:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
		at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
		at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
		at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
		at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
		at org.eclipse.lemminx.commons.ParentProcessWatcher.lambda$apply$0(ParentProcessWatcher.java:143)
		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.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
		at java.util.concurrent.FutureTask.run(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
		at java.lang.Thread.run(Unknown Source)
	Caused by: java.lang.reflect.InvocationTargetException
		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.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
		... 12 more
	Caused by: java.lang.IllegalArgumentException: Incorrect file path provided
		at org.eclipse.lemminx.logs.LogHelper.getFileHandler(LogHelper.java:114)
		at org.eclipse.lemminx.logs.LogHelper.initializeRootLogger(LogHelper.java:59)
		at org.eclipse.lemminx.XMLLanguageServer.updateSettings(XMLLanguageServer.java:150)
		at org.eclipse.lemminx.XMLLanguageServer.initialize(XMLLanguageServer.java:111)
		... 17 more
  • LemMinX 0.13.1
@fbricon fbricon added the bug Something isn't working label Oct 8, 2020
@fbricon fbricon added this to the 0.14.0 milestone Oct 8, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Oct 27, 2020
Fixes eclipse-lemminx#904

Signed-off-by: azerr <azerr@redhat.com>
datho7561 pushed a commit that referenced this issue Oct 27, 2020
Fixes #904

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants