【发布时间】:2018-11-28 23:07:13
【问题描述】:
我有一个 sbt 项目,我使用 sbt mocha 运行前端测试。每当我尝试这样做时,都会收到以下错误。其他一切都运行正常 - 我可以做 sbt test 这将运行我的 specs2 scala 测试但在 mocha 测试中出错。我什至可以毫无问题地运行项目本身。
com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure: double free or corruption (!prev)
at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:218)
at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:190)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
at scala.util.Try$.apply(Try.scala:161)
at scala.util.Success.map(Try.scala:206)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[error] (<projectnameredacted>/*:mochaExecuteTests) com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure: double free or corruption (!prev)`
我试过做一个sbt clean,我试过删除.ivy2和.sbt目录,迫使sbt重建自己。
我正在运行 sbt 0.13.17,由于这是一个公司项目,因此无法更改 sbt 版本。它还使用 scala 2.12.7。
根据我的阅读,问题来自尝试加载标准库的多个实例,但我得到的错误不是来自任何标准库,它来自项目的 sbt 包需要并且已经使用了几个月没有问题。 Here is where I got that information.
【问题讨论】: