wurstscript / WurstScript

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

Exception in thread "D3D Screen Updater" java.lang.OutOfMemoryError: Java heap space #975

Closed jlfarris91 closed 3 years ago

jlfarris91 commented 3 years ago

I consistently get this exception the second time I build my map after opening my project in vscode. As a workaround I have to restart vscode each time I want to build and run my map.

Repro steps:

  1. Pull latest on the feature/MoreEnemies branch of my project
  2. Open the Workspace.code-workspace file with vscode
  3. Build and run the map from vscode
  4. Close War 3 when it opens and wait for it to completely close
  5. Build and run the map from vscode a second time
  6. ----> See that the build process reaches Phase 2: translate classes and then the out of memory exception is thrown

languageServer.log compiler.log

Dec 02, 2020 7:01:48 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 1004
Exception in thread "D3D Screen Updater" java.lang.OutOfMemoryError: Java heap space
    at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
java.lang.OutOfMemoryError: Java heap space
    at java.util.AbstractList.iterator(Unknown Source)
    at de.peeeq.wurstscript.jassIm.AsgList.addAll(AsgList.java:39)
    at de.peeeq.wurstscript.jassIm.ImStmts.addAll(ImStmts.java:5)
    at de.peeeq.wurstscript.jassIm.JassIm.ImStmts(JassIm.java:216)
    at de.peeeq.wurstscript.translation.imtranslation.EliminateClasses.createDispatchFunc(EliminateClasses.java:305)
    at de.peeeq.wurstscript.translation.imtranslation.EliminateClasses.eliminateClasses(EliminateClasses.java:66)
    at de.peeeq.wurstio.WurstCompilerJassImpl.transformProgToJass(WurstCompilerJassImpl.java:417)
    at de.peeeq.wurstio.languageserver.requests.MapRequest.compileMap(MapRequest.java:191)
    at de.peeeq.wurstio.languageserver.requests.MapRequest.compileScript(MapRequest.java:348)
    at de.peeeq.wurstio.languageserver.requests.MapRequest.compileScript(MapRequest.java:363)
    at de.peeeq.wurstio.languageserver.requests.RunMap.execute(RunMap.java:86)
    at de.peeeq.wurstio.languageserver.requests.UserRequest.run(UserRequest.java:31)
    at de.peeeq.wurstio.languageserver.LanguageWorker.lambda$getNextWorkItem$1(LanguageWorker.java:160)
    at de.peeeq.wurstio.languageserver.LanguageWorker$$Lambda$116/576098.run(Unknown Source)
    at de.peeeq.wurstio.languageserver.LanguageWorker$Workitem.run(LanguageWorker.java:28)
    at de.peeeq.wurstio.languageserver.LanguageWorker.run(LanguageWorker.java:135)
    at java.lang.Thread.run(Unknown Source)
Error in request 'de.peeeq.wurstio.languageserver.requests.RunMap@108fa28e' (see log for details): Java heap space
Frotty commented 3 years ago

Did you try increasing heap space?

jlfarris91 commented 3 years ago

Oh! I didn't see that option in my code-workspace file originally. Good thinking. Thanks.

image