My visual code doeasn't interact with DAML types
- ronihOP
- cocreature
Please go to
View -> Outputand then selectDaml Language Serverin the drop down and show us the output here. - ronih
2022-05-26 17:53:46.51 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: Exception in thread “grpc-default-executor-4” Exception in thread “grpc-default-executor-2” java.lang.OutOfMemoryError: Java heap space2022-05-26 17:53:46.51 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: java.lang.OutOfMemoryError: Java heap space2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$$$Lambda$752/0x000000080067e840.get$Lambda(Unknown Source)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$.$anonfun$atomizeExp$1(Anf.scala:403)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$$$Lambda$751/0x000000080067e040.apply(Unknown Source)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$.$anonfun$transformExp$3(Anf.scala:322)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$$$Lambda$522/0x00000008005bc840.apply(Unknown Source)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$.$anonfun$flattenExp$3(Anf.scala:216)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$$$Lambda$524/0x00000008005bbc40.apply(Unknown Source)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.data.Trampoline$Trampoline.bounce(Trampoline.scala:17)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.data.Trampoline$Trampoline.bounce$(Trampoline.scala:15)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.data.Trampoline$Bounce.bounce(Trampoline.scala:23)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$.flattenToAnfInternal(Anf.scala:54)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Anf$.flattenToAnf(Anf.scala:47)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler.pipeline(Compiler.scala:297)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler.compileExp(Compiler.scala:287)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler.$anonfun$compileModule$2(Compiler.scala:314)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler$$Lambda$609/0x000000080061e840.apply(Unknown Source)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.immutable.BitmapIndexedMapNode.foreach(HashMap.scala:1076)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.immutable.BitmapIndexedMapNode.foreach(HashMap.scala:1083)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.immutable.BitmapIndexedMapNode.foreach(HashMap.scala:1083)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.immutable.HashMap.foreach(HashMap.scala:1083)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler.compileModule(Compiler.scala:311)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.speedy.Compiler.unsafeCompileModule(Compiler.scala:155)2022-05-26 17:53:46.52 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.scenario.Context.$anonfun$update$5(Context.scala:124)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.scenario.Context.$anonfun$update$5$adapted(Context.scala:120)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.scenario.Context$$Lambda$870/0x00000008006e0840.apply(Unknown Source)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at scala.collection.AbstractIterable.foreach(Iterable.scala:926)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.scenario.Context.update(Context.scala:120)2022-05-26 17:53:46.53 [ERROR] [LanguageServer ScenarioService]
SCENARIO SERVICE STDERR: at com.daml.lf.scenario.ScenarioService.updateContext(ScenarioServiceMain.scala:333) - ronih
thanks for your help.
Another issue I have is that I can’t see the errors in real-time but only after running “daml build”. - cocreature
Hm those logs look fine. Can you try creating a new project and testing in that:
daml new foobar cd foobar daml studio - ronih
In a new project, everything is fine.
I see both the types and the “Script results”.
So do I have to rebuild my project ???did you see the second output results? there are a lot of error
- cocreature
Oh I missed the second part. So you’re somehow running out of memory. One option for that could be that one of your scripts produces an infinite loop or at least runs very long. You could selectively try to comment out certain scripts to narrow it down. If you can share your project we might also be able to point at the problematic code.
- ronih
it happened just once.
Right now, I dont see those errors.but still, cant see the types and the “Script results”. - cocreature
Try restarting the language server via
Ctrl/Cmd-Shift-P→Reload Window. - ronih
Nope. Sorry…but it didnt help
- cocreature
Can you share your project? If the logs show no errors after a restart but you still don’t get script results, I don’t really know what could be going wrong.
- ronih
@cocreature i maanged to get it working with “daml studio” command

