java.lang.ArrayIndexOutOfBoundsException: -1

Scala JIRA | Marek Żebrowski | 4 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    GitHub comment 1815#260135127

    GitHub | 3 months ago | Shadowfiend
    java.lang.ArrayIndexOutOfBoundsException: -1
  2. 0

    Compiler aborts with message {noformat} java.lang.ArrayIndexOutOfBoundsException: -1 at scala.tools.nsc.backend.jvm.analysis.BackendUtils.enqInsnIndex$1(BackendUtils.scala:430) at scala.tools.nsc.backend.jvm.analysis.BackendUtils.enqInsn$1(BackendUtils.scala:426) at scala.tools.nsc.backend.jvm.analysis.BackendUtils.computeMaxLocalsMaxStack(BackendUtils.scala:477) at scala.tools.nsc.backend.jvm.analysis.BackendUtils$AsmAnalyzer.<init>(BackendUtils.scala:35) at scala.tools.nsc.backend.jvm.opt.LocalOpt.removeUnreachableCodeImpl(LocalOpt.scala:488) at scala.tools.nsc.backend.jvm.opt.LocalOpt.removalRound$2(LocalOpt.scala:275) at scala.tools.nsc.backend.jvm.opt.LocalOpt.methodOptimizations(LocalOpt.scala:354) at scala.tools.nsc.backend.jvm.opt.LocalOpt.$anonfun$methodOptimizations$1(LocalOpt.scala:195) at scala.tools.nsc.backend.jvm.opt.LocalOpt.$anonfun$methodOptimizations$1$adapted(LocalOpt.scala:194) at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:157) at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:157) at scala.collection.AbstractIterator.foreach(Iterator.scala:932) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:157) at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:155) at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104) at scala.tools.nsc.backend.jvm.opt.LocalOpt.methodOptimizations(LocalOpt.scala:194) at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.$anonfun$localOptimizations$1(GenBCode.scala:248) at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.localOptimizations(GenBCode.scala:248) at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.run(GenBCode.scala:267) at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:384) at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350) at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1404) at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1389) at scala.tools.nsc.Global$Run.compileSources(Global.scala:1384) at scala.tools.nsc.Global$Run.compile(Global.scala:1478) at xsbt.CachedCompiler0.run(CompilerInterface.scala:116) {noformat} Stacktrace leads to {{if (insnIndex < size && stackHeights(insnIndex) != -1)}} So insnIndex is equal -1 obviously. Mailing list https://groups.google.com/d/msg/scala-internals/ixmajCw9nfg/kaIoa7BpAwAJ source code repo with reproducer: https://github.com/sgrouples/framework/tree/scala-2.12.0-wip to reproduce- checkout and run sbt compile

    Scala JIRA | 4 months ago | Marek Żebrowski
    java.lang.ArrayIndexOutOfBoundsException: -1
  3. 0

    2.12.0 - java.lang.ArrayIndexOutOfBoundsException: -1 when emitting code

    Google Groups | 4 months ago | Marek Żebrowski
    java.lang.ArrayIndexOutOfBoundsException: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 4837#154630308

    GitHub | 1 year ago | lrytz
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      -1

      at scala.tools.nsc.backend.jvm.analysis.BackendUtils.enqInsnIndex$1()
    2. scala.tools.nsc
      BackendUtils$AsmAnalyzer.<init>
      1. scala.tools.nsc.backend.jvm.analysis.BackendUtils.enqInsnIndex$1(BackendUtils.scala:430)
      2. scala.tools.nsc.backend.jvm.analysis.BackendUtils.enqInsn$1(BackendUtils.scala:426)
      3. scala.tools.nsc.backend.jvm.analysis.BackendUtils.computeMaxLocalsMaxStack(BackendUtils.scala:477)
      4. scala.tools.nsc.backend.jvm.analysis.BackendUtils$AsmAnalyzer.<init>(BackendUtils.scala:35)
      4 frames
    3. Scala Compiler
      LocalOpt.$anonfun$methodOptimizations$1$adapted
      1. scala.tools.nsc.backend.jvm.opt.LocalOpt.removeUnreachableCodeImpl(LocalOpt.scala:488)
      2. scala.tools.nsc.backend.jvm.opt.LocalOpt.removalRound$2(LocalOpt.scala:275)
      3. scala.tools.nsc.backend.jvm.opt.LocalOpt.methodOptimizations(LocalOpt.scala:354)
      4. scala.tools.nsc.backend.jvm.opt.LocalOpt.$anonfun$methodOptimizations$1(LocalOpt.scala:195)
      5. scala.tools.nsc.backend.jvm.opt.LocalOpt.$anonfun$methodOptimizations$1$adapted(LocalOpt.scala:194)
      5 frames
    4. Scala
      AbstractTraversable.foldLeft
      1. scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:157)
      2. scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:157)
      3. scala.collection.AbstractIterator.foreach(Iterator.scala:932)
      4. scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      5. scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:157)
      6. scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:155)
      7. scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
      7 frames
    5. Scala Compiler
      Global$Run.compile
      1. scala.tools.nsc.backend.jvm.opt.LocalOpt.methodOptimizations(LocalOpt.scala:194)
      2. scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.$anonfun$localOptimizations$1(GenBCode.scala:248)
      3. scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.localOptimizations(GenBCode.scala:248)
      4. scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.run(GenBCode.scala:267)
      5. scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:384)
      6. scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350)
      7. scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1404)
      8. scala.tools.nsc.Global$Run.compileUnits(Global.scala:1389)
      9. scala.tools.nsc.Global$Run.compileSources(Global.scala:1384)
      10. scala.tools.nsc.Global$Run.compile(Global.scala:1478)
      10 frames
    6. SBT
      CachedCompiler0.run
      1. xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
      1 frame