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

vscode run wurst map results in error wurst.startmap failed, but only on some projects #1034

Closed
Cokemonkey11 opened this issue Oct 12, 2021 · 4 comments

Comments

@Cokemonkey11
Copy link
Collaborator

Cokemonkey11 commented Oct 12, 2021

Describe the bug
When executing runmap with mapfile and correct wurst.wc3path in settings.json, language server request fails immediately

image

diags

@peq
Copy link
Collaborator

peq commented Oct 16, 2021

Might be the same problem as #1029

getBestW3InstallationData fails to get the wc3 version, but this step should not fail the build - intead users shold be able to set this information in configuration.

@Cokemonkey11
Copy link
Collaborator Author

Cokemonkey11 commented Oct 17, 2021

@peq this may help with debugging: inwc3/wc3libs#73

Because:

Looking a little more closely, I think the smoking gun is here: my diags do not have this error message, which means to me that MapRequest is being created with empty wc3path - langserver not reading from config correctly or something broken when plumbing that context.

Again, this is working in another map, so the bug seems to be borne out of my use of this map project

@Cokemonkey11
Copy link
Collaborator Author

I have a repro of this in another project.

wurstLanguageServer logs in vscode:

Loading Wurst version 1.8.1.0-jenkins-Wurst-1319
initialization done!
net.moonlightflower.wc3libs.port.NotFoundException: java.lang.Exception: tried: [Warcraft III.exe, Frozen Throne.exe, war3.exe, x86\Warcraft III.exe, x86_64\Warcraft III.exe, _retail_\x86\Warcraft III.exe, _retail_\x86_64\Warcraft III.exe]
	at net.moonlightflower.wc3libs.port.win.WinGameExeFinder.fromDirIgnoreVersion(WinGameExeFinder.java:111)
	at net.moonlightflower.wc3libs.port.win.WinGameExeFinder.fromDirIgnoreVersion(WinGameExeFinder.java:116)
	at de.peeeq.wurstio.utils.W3InstallationData.<init>(W3InstallationData.java:45)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.getBestW3InstallationData(MapRequest.java:388)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.<init>(MapRequest.java:77)
	at de.peeeq.wurstio.languageserver.requests.RunMap.<init>(RunMap.java:51)
	at de.peeeq.wurstio.languageserver.WurstCommands.startmap(WurstCommands.java:108)
	at de.peeeq.wurstio.languageserver.WurstCommands.execute(WurstCommands.java:51)
	at de.peeeq.wurstio.languageserver.WurstWorkspaceService.executeCommand(WurstWorkspaceService.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint$$Lambda$15/0x0000000000000000.apply(Unknown Source)
	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.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(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:826)
Caused by: java.lang.Exception: tried: [Warcraft III.exe, Frozen Throne.exe, war3.exe, x86\Warcraft III.exe, x86_64\Warcraft III.exe, _retail_\x86\Warcraft III.exe, _retail_\x86_64\Warcraft III.exe]
	... 26 more
net.moonlightflower.wc3libs.port.NotFoundException
	at net.moonlightflower.wc3libs.port.win.WinGameExeFinder.find(WinGameExeFinder.java:151)
	at net.moonlightflower.wc3libs.port.win.WinGameExeFinder.find(WinGameExeFinder.java:11)
	at net.moonlightflower.wc3libs.port.Finder.get(Finder.java:25)
	at net.moonlightflower.wc3libs.port.StdGameExeFinder.find(StdGameExeFinder.java:36)
	at net.moonlightflower.wc3libs.port.StdGameExeFinder.find(StdGameExeFinder.java:9)
	at net.moonlightflower.wc3libs.port.Finder.get(Finder.java:25)
	at de.peeeq.wurstio.utils.W3InstallationData.discoverExePath(W3InstallationData.java:71)
	at de.peeeq.wurstio.utils.W3InstallationData.<init>(W3InstallationData.java:64)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.getBestW3InstallationData(MapRequest.java:388)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.<init>(MapRequest.java:77)
	at de.peeeq.wurstio.languageserver.requests.RunMap.<init>(RunMap.java:51)
	at de.peeeq.wurstio.languageserver.WurstCommands.startmap(WurstCommands.java:108)
	at de.peeeq.wurstio.languageserver.WurstCommands.execute(WurstCommands.java:51)
	at de.peeeq.wurstio.languageserver.WurstWorkspaceService.executeCommand(WurstWorkspaceService.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint$$Lambda$15/0x0000000000000000.apply(Unknown Source)
	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.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(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:826)
net.moonlightflower.wc3libs.port.NotFoundException: net.moonlightflower.wc3libs.port.NotFoundException
	at net.moonlightflower.wc3libs.port.StdGameVersionFinder.find(StdGameVersionFinder.java:40)
	at net.moonlightflower.wc3libs.port.StdGameVersionFinder.find(StdGameVersionFinder.java:12)
	at net.moonlightflower.wc3libs.port.Finder.get(Finder.java:25)
	at de.peeeq.wurstio.utils.W3InstallationData.discoverVersion(W3InstallationData.java:80)
	at de.peeeq.wurstio.utils.W3InstallationData.<init>(W3InstallationData.java:65)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.getBestW3InstallationData(MapRequest.java:388)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.<init>(MapRequest.java:77)
	at de.peeeq.wurstio.languageserver.requests.RunMap.<init>(RunMap.java:51)
	at de.peeeq.wurstio.languageserver.WurstCommands.startmap(WurstCommands.java:108)
	at de.peeeq.wurstio.languageserver.WurstCommands.execute(WurstCommands.java:51)
	at de.peeeq.wurstio.languageserver.WurstWorkspaceService.executeCommand(WurstWorkspaceService.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint$$Lambda$15/0x0000000000000000.apply(Unknown Source)
	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.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(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:826)
Caused by: net.moonlightflower.wc3libs.port.NotFoundException
	at net.moonlightflower.wc3libs.port.win.WinGameVersionFinder.find(WinGameVersionFinder.java:39)
	at net.moonlightflower.wc3libs.port.win.WinGameVersionFinder.find(WinGameVersionFinder.java:9)
	at net.moonlightflower.wc3libs.port.Finder.get(Finder.java:25)
	at net.moonlightflower.wc3libs.port.StdGameVersionFinder.find(StdGameVersionFinder.java:38)
	... 27 more
Nov 04, 2021 12:03:11 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
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$$Lambda$15/0x0000000000000000.apply(Unknown Source)
	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.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(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:826)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 12 more
Caused by: de.peeeq.wurstio.languageserver.requests.RequestFailedException: Could not find Warcraft III installation at specified path: Optional[]
	at de.peeeq.wurstio.languageserver.requests.MapRequest.getBestW3InstallationData(MapRequest.java:390)
	at de.peeeq.wurstio.languageserver.requests.MapRequest.<init>(MapRequest.java:77)
	at de.peeeq.wurstio.languageserver.requests.RunMap.<init>(RunMap.java:51)
	at de.peeeq.wurstio.languageserver.WurstCommands.startmap(WurstCommands.java:108)
	at de.peeeq.wurstio.languageserver.WurstCommands.execute(WurstCommands.java:51)
	at de.peeeq.wurstio.languageserver.WurstWorkspaceService.executeCommand(WurstWorkspaceService.java:42)
	... 17 more

languageServer.log

compiler.log is empty

@Frotty
Copy link
Member

Frotty commented Nov 29, 2023

Path is now used correctly and if not path is found one can be selected by user which will be added to workspace config.

@Frotty Frotty closed this as completed Nov 29, 2023
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