SBT编译StackOverflowError

时间:2016-08-01 12:38:30

标签: java scala compilation sbt stack-overflow

调试显示(在List.scala的行loop(null, this, this)中:

enter image description here

和TypeMaps.scala的行parents mapConserve this

enter image description here

如何检查导致它的行?

SBT编译需要361秒,然后抛出:

java.lang.StackOverflowError
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:714)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:148)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.applyToSymbolInfo(TypeMaps.scala:218)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.loop$1(TypeMaps.scala:227)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.noChangeToSymbols(TypeMaps.scala:229)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:243)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:161)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:750)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:157)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:149)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.applyToSymbolInfo(TypeMaps.scala:218)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.loop$1(TypeMaps.scala:227)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.noChangeToSymbols(TypeMaps.scala:229)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:243)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:161)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:750)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:157)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:149)
    at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:716)
    at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:777)
    at scala.reflect.internal.Types$Type.substSym(Types.scala:715)
    at scala.reflect.internal.Symbols$Symbol$$anonfun$substInfo$1.apply(Symbols.scala:1546)
    at scala.reflect.internal.Symbols$Symbol$$anonfun$substInfo$1.apply(Symbols.scala:1546)
    at scala.reflect.internal.Symbols$Symbol.modifyInfo(Symbols.scala:1542)
    at scala.reflect.internal.Symbols$Symbol.substInfo(Symbols.scala:1546)
    at scala.reflect.internal.Symbols$$anonfun$deriveSymbols$1.apply(Symbols.scala:3582)
    at scala.reflect.internal.Symbols$$anonfun$deriveSymbols$1.apply(Symbols.scala:3582)
    at scala.reflect.internal.util.Collections$class.mapList(Collections.scala:52)
    at scala.reflect.internal.SymbolTable.mapList(SymbolTable.scala:16)
    at scala.reflect.internal.Symbols$class.deriveSymbols(Symbols.scala:3582)
    at scala.reflect.internal.SymbolTable.deriveSymbols(SymbolTable.scala:16)
    at scala.reflect.internal.Symbols$class.cloneSymbols(Symbols.scala:3642)
    at scala.reflect.internal.SymbolTable.cloneSymbols(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.withTypeVars(Types.scala:2695)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:483)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:248)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:247)
    at scala.collection.TraversableLike$class.filter(TraversableLike.scala:259)
    at scala.collection.AbstractTraversable.filter(Traversable.scala:104)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub0$1(GlbLubs.scala:201)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub(GlbLubs.scala:204)
    at scala.reflect.internal.tpe.GlbLubs$class.loop$1(GlbLubs.scala:135)
    at scala.reflect.internal.tpe.GlbLubs$class.lubList(GlbLubs.scala:167)
    at scala.reflect.internal.SymbolTable.lubList(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$class.lub1$1(GlbLubs.scala:329)
    at scala.reflect.internal.tpe.GlbLubs$class.lub0$1(GlbLubs.scala:322)
    at scala.reflect.internal.tpe.GlbLubs$class.lub(GlbLubs.scala:419)
    at scala.reflect.internal.SymbolTable.lub(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solveOne$1(TypeConstraints.scala:249)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.util.Collections$class.foreach3(Collections.scala:231)
    at scala.reflect.internal.SymbolTable.foreach3(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solve(TypeConstraints.scala:260)
    at scala.reflect.internal.SymbolTable.solve(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.withTypeVars(Types.scala:2699)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:483)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:248)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:247)
    at scala.collection.TraversableLike$class.filter(TraversableLike.scala:259)
    at scala.collection.AbstractTraversable.filter(Traversable.scala:104)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub0$1(GlbLubs.scala:201)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub(GlbLubs.scala:204)
    at scala.reflect.internal.tpe.GlbLubs$class.loop$1(GlbLubs.scala:135)
    at scala.reflect.internal.tpe.GlbLubs$class.lubList(GlbLubs.scala:167)
    at scala.reflect.internal.SymbolTable.lubList(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$class.lub1$1(GlbLubs.scala:329)
    at scala.reflect.internal.tpe.GlbLubs$class.lub0$1(GlbLubs.scala:322)
    at scala.reflect.internal.tpe.GlbLubs$class.lub(GlbLubs.scala:419)
    at scala.reflect.internal.SymbolTable.lub(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solveOne$1(TypeConstraints.scala:249)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.util.Collections$class.foreach3(Collections.scala:231)
    at scala.reflect.internal.SymbolTable.foreach3(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solve(TypeConstraints.scala:260)
    at scala.reflect.internal.SymbolTable.solve(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.withTypeVars(Types.scala:2699)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:483)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$elimSub0$1$1.apply(GlbLubs.scala:202)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$elimSub0$1$1.apply(GlbLubs.scala:202)
    at scala.collection.LinearSeqOptimized$class.exists(LinearSeqOptimized.scala:93)
    at scala.collection.immutable.List.exists(List.scala:84)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub0$1(GlbLubs.scala:202)
    at scala.reflect.internal.tpe.GlbLubs$class.elimSub(GlbLubs.scala:204)
    at scala.reflect.internal.tpe.GlbLubs$class.lub0$1(GlbLubs.scala:301)
    at scala.reflect.internal.tpe.GlbLubs$class.lub(GlbLubs.scala:419)
    at scala.reflect.internal.SymbolTable.lub(SymbolTable.scala:16)
    at scala.reflect.internal.Types$$anonfun$36.apply(Types.scala:4411)
    at scala.reflect.internal.Types$$anonfun$36.apply(Types.scala:4396)
    at scala.reflect.internal.util.Collections$class.map2(Collections.scala:79)
    at scala.reflect.internal.SymbolTable.map2(SymbolTable.scala:16)
    at scala.reflect.internal.Types$class.mergePrefixAndArgs(Types.scala:4396)
    at scala.reflect.internal.SymbolTable.mergePrefixAndArgs(SymbolTable.scala:16)
    at scala.reflect.internal.BaseTypeSeqs$BaseTypeSeq.apply(BaseTypeSeqs.scala:68)
    at scala.reflect.internal.Types$CompoundType.baseType(Types.scala:1402)
    at scala.reflect.internal.Types$ClassTypeRef$class.baseType(Types.scala:1968)
    at scala.reflect.internal.Types$RefinementTypeRef.baseType(Types.scala:1911)
    at scala.reflect.internal.Types$SimpleTypeProxy$class.baseType(Types.scala:162)
    at scala.reflect.internal.Types$SingletonType.baseType(Types.scala:1076)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.loop$4(TypeMaps.scala:663)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.thisTypeAsSeen(TypeMaps.scala:669)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:480)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.singleTypeAsSeen(TypeMaps.scala:675)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:482)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.singleTypeAsSeen(TypeMaps.scala:675)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:482)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.singleTypeAsSeen(TypeMaps.scala:675)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:482)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.singleTypeAsSeen(TypeMaps.scala:675)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:482)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:110)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:484)
    at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:138)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.apply(TypeMaps.scala:484)
    at scala.reflect.internal.Types$Type.asSeenFrom(Types.scala:663)
    at scala.reflect.internal.Types$Type.computeMemberType(Types.scala:698)
    at scala.reflect.internal.Symbols$MethodSymbol.typeAsMemberOf(Symbols.scala:2946)
    at scala.reflect.internal.Types$Type.memberType(Types.scala:689)
    at scala.reflect.internal.tpe.FindMembers$FindMember.member0Tpe(FindMembers.scala:269)
    at scala.reflect.internal.tpe.FindMembers$FindMember.memberTypeLow(FindMembers.scala:274)
    at scala.reflect.internal.tpe.FindMembers$FindMemberBase.isNewMember(FindMembers.scala:158)
    at scala.reflect.internal.tpe.FindMembers$FindMember.addMemberIfNew(FindMembers.scala:242)
    at scala.reflect.internal.tpe.FindMembers$FindMemberBase.walkBaseClasses(FindMembers.scala:98)
    at scala.reflect.internal.tpe.FindMembers$FindMemberBase.searchConcreteThenDeferred(FindMembers.scala:58)
    at scala.reflect.internal.tpe.FindMembers$FindMemberBase.apply(FindMembers.scala:48)
    at scala.reflect.internal.Types$Type.scala$reflect$internal$Types$Type$$findMemberInternal$1(Types.scala:1014)
    ...
    ...
    ...
    at scala.reflect.internal.Types$Type.findMember(Types.scala:1016)
    at scala.reflect.internal.Types$Type.memberBasedOnName(Types.scala:631)
    at scala.reflect.internal.Types$Type.nonPrivateMember(Types.scala:607)
    at scala.reflect.internal.tpe.GlbLubs$class.refines$1(GlbLubs.scala:372)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$excludeFromLub$1$1.apply(GlbLubs.scala:345)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$excludeFromLub$1$1.apply(GlbLubs.scala:345)
    at scala.collection.LinearSeqOptimized$class.exists(LinearSeqOptimized.scala:93)
    at scala.collection.immutable.List.exists(List.scala:84)
    at scala.reflect.internal.tpe.GlbLubs$class.excludeFromLub$1(GlbLubs.scala:345)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$25.apply(GlbLubs.scala:380)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$25.apply(GlbLubs.scala:380)
    at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
    at scala.reflect.internal.Scopes$Scope.foreach(Scopes.scala:373)
    at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
    at scala.reflect.internal.tpe.GlbLubs$class.lub1$1(GlbLubs.scala:380)
    at scala.reflect.internal.tpe.GlbLubs$class.lub0$1(GlbLubs.scala:322)
    at scala.reflect.internal.tpe.GlbLubs$class.lub(GlbLubs.scala:419)
    at scala.reflect.internal.SymbolTable.lub(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solveOne$1(TypeConstraints.scala:249)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.util.Collections$class.foreach3(Collections.scala:231)
    at scala.reflect.internal.SymbolTable.foreach3(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solve(TypeConstraints.scala:260)
    at scala.reflect.internal.SymbolTable.solve(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.withTypeVars(Types.scala:2699)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:483)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:501)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$class.specializesSym(Types.scala:4172)
    at scala.reflect.internal.SymbolTable.specializesSym(SymbolTable.scala:16)
    at scala.reflect.internal.Types$class.directlySpecializedBy$1(Types.scala:4129)
    at scala.reflect.internal.Types$class.specializedBy$1(Types.scala:4135)
    at scala.reflect.internal.Types$class.specializesSym(Types.scala:4139)
    at scala.reflect.internal.SymbolTable.specializesSym(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeComparers$$anonfun$thirdTry$1$2.apply(TypeComparers.scala:481)
    at scala.reflect.internal.tpe.TypeComparers$$anonfun$thirdTry$1$2.apply(TypeComparers.scala:481)
    at scala.collection.Iterator$class.forall(Iterator.scala:905)
    at scala.collection.AbstractIterator.forall(Iterator.scala:1336)
    at scala.collection.IterableLike$class.forall(IterableLike.scala:75)
    at scala.reflect.internal.Scopes$Scope.forall(Scopes.scala:51)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:481)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$27.apply(GlbLubs.scala:393)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$27.apply(GlbLubs.scala:392)
    at scala.collection.LinearSeqOptimized$class.forall(LinearSeqOptimized.scala:83)
    at scala.collection.immutable.List.forall(List.scala:84)
    at scala.reflect.internal.tpe.GlbLubs$class.lub1$1(GlbLubs.scala:392)
    at scala.reflect.internal.tpe.GlbLubs$class.lub0$1(GlbLubs.scala:322)
    at scala.reflect.internal.tpe.GlbLubs$class.lub(GlbLubs.scala:419)
    at scala.reflect.internal.SymbolTable.lub(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solveOne$1(TypeConstraints.scala:249)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.tpe.TypeConstraints$$anonfun$solve$1.apply(TypeConstraints.scala:260)
    at scala.reflect.internal.util.Collections$class.foreach3(Collections.scala:231)
    at scala.reflect.internal.SymbolTable.foreach3(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeConstraints$class.solve(TypeConstraints.scala:260)
    at scala.reflect.internal.SymbolTable.solve(SymbolTable.scala:16)
    at scala.reflect.internal.Types$ExistentialType.withTypeVars(Types.scala:2699)
    at scala.reflect.internal.tpe.TypeComparers$class.thirdTry$1(TypeComparers.scala:483)
    at scala.reflect.internal.tpe.TypeComparers$class.secondTry$1(TypeComparers.scala:450)
    at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:426)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
    at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:273)
    at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.reflect.internal.tpe.GlbLubs$$anonfun$15.apply(GlbLubs.scala:201)
    at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:248)
[error] (render/compile:compileIncremental) java.lang.StackOverflowError
[error] Total time: 361 s, completed 2016-08-01 13:49:09

1 个答案:

答案 0 :(得分:0)

您应该可以使用远程调试。在您喜欢的IDE(http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Fconcepts%2Fcremdbug.htm for Eclipse,https://www.jetbrains.com/help/idea/2016.2/run-debug-configuration-remote.html for IDEA)中创建一个远程调试器配置,其中包含scala-compiler-<your-scala-version>-sources.jarscala-reflect-<your-scala-version>-sources.jar。添加

set javaOptions in compiler := List("-Xdebug", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8002")
在您的SBT构建中

(取自https://groups.google.com/d/msg/scala-user/XI_Ujax_Oq8/o2Hrs-KjAgAJ)。然后当你运行sbt compile时,它会等到你开始调试会话。为StackOverflowError设置一个异常断点,你应该将问题本地化(不一定是特定的行)。