wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
225 stars 30 forks source link

Internal error. #1074

Closed StN-NL closed 1 year ago

StN-NL commented 1 year ago

Command 'wurst: Build your map via wurst.build (into /_build)' resulted in an error

2023-03-07 17:50:37 [pool-2-thread-1] INFO languageServer - Game Executable from path: Optional[C:\Program Files (x86)\Warcraft III\Warcraft III.exe] 2023-03-07 17:50:37 [pool-2-thread-1] ERROR languageServer - Error java.io.IOException: Version string ?? V e r s i o n = from file produced by WMIC wasn't readable. This is the second failed attempt after dorkbox PE failed with exception. at net.moonlightflower.wc3libs.bin.GameExe.getVersionString(GameExe.java:79) at net.moonlightflower.wc3libs.bin.GameExe.getVersion(GameExe.java:93) at de.peeeq.wurstio.utils.W3InstallationData.lambda$new$0(W3InstallationData.java:53) at java.util.Optional.flatMap(Unknown Source) at de.peeeq.wurstio.utils.W3InstallationData.<init>(W3InstallationData.java:51) at de.peeeq.wurstio.languageserver.requests.MapRequest.getBestW3InstallationData(MapRequest.java:396) at de.peeeq.wurstio.languageserver.requests.MapRequest.<init>(MapRequest.java:80) at de.peeeq.wurstio.languageserver.requests.BuildMap.<init>(BuildMap.java:31) at de.peeeq.wurstio.languageserver.WurstCommands.buildmap(WurstCommands.java:93) at de.peeeq.wurstio.languageserver.WurstCommands.execute(WurstCommands.java:61) at de.peeeq.wurstio.languageserver.WurstWorkspaceService.executeCommand(WurstWorkspaceService.java:42) 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) 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(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.NullPointerException: null at dorkbox.peParser.PE.getVersion(PE.java:290) at net.moonlightflower.wc3libs.bin.GameExe.getVersionString(GameExe.java:30) ... 26 common frames omitted 2023-03-07 17:50:37 [pool-2-thread-1] INFO languageServer - Parsed custom game version from executable: Optional.empty

It worked before. Any idea what is going on?

StN-NL commented 1 year ago

For future reference. I had to compare the setup with another PC that was still compiling just fine. Somehow a 1 KB "Warcraft III.exe" was created at "C:\Program Files (x86)\Warcraft III". Deleting this file solved the issue.