Note that there are some explanatory texts on larger screens.

plurals
  1. POOut of memory error during Scala compilation
    primarykey
    data
    text
    <p>I'm using the macro-heavy <code>scala-pickling</code> along with <code>shapeless</code>, and I keep crashing the Scala 2.10.3 compiler with an apparent out of memory error. The tail of the error message looks like this:</p> <pre><code>[error] &lt;tpt&gt; // tree.tpe=tasks.anonfun$218 [error] Block( // tree.tpe=Unit [error] Apply( // def &lt;init&gt;(): scala.runtime.AbstractFunction1 in class AbstractFunction1, tree.tpe=scala.runtime.AbstractFunction1 [error] SimpleMiddlebury$$anonfun$218.super."&lt;init&gt;" // def &lt;init&gt;(): scala.runtime.AbstractFunction1 in class AbstractFunction1, tree.tpe=()scala.runtime.AbstractFunction1 [error] Nil [error] ) [error] () [error] ) [error] ) [error] ) [error] [error] == Expanded type of tree == [error] [error] ConstantType(value = Constant(anon$326)) [error] [error] uncaught exception during compilation: java.io.IOException [error] Cannot allocate memory </code></pre> <p>I'm monitoring my system memory, and there's plenty, so if this is really a problem with memory allocation, I'm guessing there's some JVM flag I can set somewhere to make the problem go away.</p> <p>However, I <em>have</em> tried increasing the available memory, by adjusting the heap setting in <a href="https://github.com/paulp/sbt-extras" rel="nofollow">paulp's sbt</a> script to <code>-Xmx8g</code>, and I still get this error. Is this the right flag?</p> <p>Ideas?</p> <p>EDIT: I added the "scala-pickling" and "shapeless" tags, because this is something other users of those libraries may have encountered.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload